Kaplay.Vec2
Types
t
type t = {mutable x: float, mutable y: float}
Fields
x float
y float
Values
add
let add: (t, t) => t
dist
let dist: (t, t) => float
dot
let dot: (t, t) => float
len
let len: t => float
Parameters
Return type
float
lerp
let lerp: (t, t, float) => t
scale
let scale: (t, t) => t
sub
let sub: (t, t) => t
unit
let unit: t => t
x
Vec2.x(vec2)
get the x coordinate of the vector
This is the same as vec2.x
but more convenient to use when piping.
let x: t => float
Parameters
Return type
float
y
Vec2.y(vec2)
get the y coordinate of the vector
This is the same as vec2.y
but more convenient to use when piping.
let y: t => float
Parameters
Return type
float