package vector3

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

3D vectors

type 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 dist : t -> t -> float
val div : t -> float -> t
val mult : t -> float -> t
val normalize : t -> t
val neg : t -> t
OCaml

Innovation. Community. Security.