tida.vector

Module two-dimensional vectors.

Mainly contains vector arithmetic functions as well as some traits.

Members

Aliases

Vecf
alias Vecf = Vector!float
Undocumented in source.
isVecfNaN
alias isVecfNaN = isVectorNaN!float

Checks if the vector is non-numeric.

vec
alias vec(T) = Vector!T
Undocumented in source.
vecf
alias vecf = vec!float
Undocumented in source.

Enums

vecZero
eponymoustemplate vecZero(T)

Zero vector

Functions

abs
inout(Vector!T) abs(inout(Vector!T) vec)

Construct the vector modulo.

averateVectors
inout(Vector!T) averateVectors(inout(Vector!T) a, inout(Vector!T) b)

Average distance between vectors.

distance
inout(T) distance(inout(Vector!T) a, inout(Vector!T) b)

Distance between two points.

floor
inout(Vector!T) floor(inout(Vector!T) vec)

Floors the vector down.

generateArray
T[] generateArray(Vector!T[] vectors)

Generates a buffer from vectors.

isVectorNaN
bool isVectorNaN(Vector!T vector)

Checks if the vector is non-numeric.

round
inout(Vector!T) round(inout(Vector!T) vec)

Rounds the vector up.

sqr
inout(T) sqr(inout(T) value)
Undocumented in source. Be warned that the author may not have intended to support it.
uniform
inout(Vector!T) uniform(inout(Vector!T) begin, inout(Vector!T) end)

Creates a random vector.

Manifest constants

vecfNaN
enum vecfNaN;

Not a numeric vector.

vecfZero
enum vecfZero;

Zero vector

Structs

Vector
struct Vector(T)

Vector structure. May include any numeric data type available for vector arithmetic.

Templates

isVector
template isVector(T)

Checks if this type is a vector.

isVectorFloatingPoint
template isVectorFloatingPoint(T)

Checks if the vector is float.

isVectorIntegral
template isVectorIntegral(T)

Checks if the vector is integers.

vecNaN
template vecNaN(T)

Not a numeric vector.

Meta

Authors

License