package mmo

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include module type of struct include Vector3 end

3D vectors

type t = Vector3.t = {
  1. x : float;
  2. y : float;
  3. z : float;
}
Constructors
val origin : t
val make : float -> float -> float -> t
val of_triplet : (float * float * float) -> t
val of_string : string -> t
Export to other types
val to_triplet : t -> float * float * float
val to_string : t -> string
Operations
val dot : t -> t -> float
val cross : t -> t -> t
val diff : t -> t -> t
val add : t -> t -> t
val mag2 : t -> float
val mag : t -> float
val angle : t -> t -> float
val div : t -> float -> t
val mult : t -> float -> t
val normalize : t -> t
val neg : t -> t
val create : float -> float -> float -> t
val cube : float -> t
val short_str : t -> string
val xyz_dump : Stdlib.out_channel -> t -> unit
val dist2 : t -> t -> float
val dist : t -> t -> float
OCaml

Innovation. Community. Security.