Vector
Overview
CopyVector(Vector
vector)
void
GetRandomVector(`integer
boolean
VectorEquals(Vector
v1, Vector
v2)
boolean
VectorFuzzyEquals(Vector
v1, Vector
v2, number?
epsilon = 0.001 )
boolean
VectorHasLength(Vector
v, number?
epsilon = 0.001 )
VectorToDirection(Vector
vector)
Functions
CopyVector()
Vector
CopyVector(
Vector
vector)
Helper function to copy a Vector
Isaac API class.
GetRandomVector()
void GetRandomVector(integer | RNG Optional. The seed or
RNGobject to use. If an
RNGobject is provided, the
RNG:Nextmethod will be called. Default is
GetRandomSeed? seedOrRNG?)
Returns a random vector between (-1, -1) and (1, 1). You can get a larger vector by multiplying the returned vector. Unlike RandomVector()
, this function supports seeding.
VectorEquals()
boolean VectorEquals(
Vector
v1,
Vector
v2)
Helper function to check if two vectors are exactly equal.
VectorFuzzyEquals()
boolean VectorFuzzyEquals(
Vector
v1,
Vector
v2, number? epsilon = 0.001 )
Helper function to see if two vectors are equal within the given tolerance epsilon
.
VectorHasLength()
boolean VectorHasLength(
Vector
v, number? epsilon = 0.001 )
Helper function to see if a vector has a length greater than zero within the given tolerance epsilon
.
VectorToDirection()
Direction
VectorToDirection(
Vector
vector)
Returns a direction corresponding to the direction the provided vector is pointing.
Last updated