sel.math.vector

Members

Aliases

Vector
alias Vector(T, string coords) = Vector!(T, coords.dup)
Vector2
alias Vector2(T) = Vector!(T, "xz")
Vector3
alias Vector3(T) = Vector!(T, "xyz")
Vector4
alias Vector4(T) = Vector!(T, "xyzw")

Vector for coordinates storing and operations.

Functions

abs
T abs(T vector)

Calculate the absolute value of the array.

ceil
T ceil(T vector)

Ceils a vector to the nearest integer.

cross
Vector!(CommonType!(A, B), coords) cross(Vector!(A, coords) a, Vector!(B, coords) b)
Undocumented in source. Be warned that the author may not have intended to support it.
distance
double distance(Vector!(T, coords) vector1, Vector!(E, coords) vector2)

Calculates the distance between to vectors of the same length.

distanceSquared
double distanceSquared(F vector1, G vector2)
Undocumented in source. Be warned that the author may not have intended to support it.
dot
double dot(Vector!(T, coords) vector1, Vector!(E, coords) vector2)
Undocumented in source. Be warned that the author may not have intended to support it.
floor
T floor(T vector)

Floors a vector to the nearest integer.

isFinite
bool isFinite(T vector)

Checks whether or not every member of the vector is finite (not infite, -inifite, nan).

isNaN
bool isNaN(T vector)

Checks whether or not at least one member of the vector is not a number (nan).

mathFunction
T mathFunction(T vector)
Undocumented in source. Be warned that the author may not have intended to support it.
round
T round(T vector)

Rounds a vector to the nearest integer.

vector
auto vector(E args)

Automatically creates a vector if the number of the given arguments matches one of the default vectors.

Structs

Vector
struct Vector(T, char[] c)

Vector for coordinates storing and operations.

Variables

isVector
enum bool isVector(T);

Checks if the given type is a vector

Meta

Authors

Kripth