Vector

Undocumented in source.
struct Vector (
T
size_t N
) if (
isNumeric!T &&
N > 0
) {}

Constructors

this
this(T val)
Undocumented in source.
this
this(T[N] vals)
Undocumented in source.

Alias This

data

Members

Aliases

VecType
alias VecType = Vector!(T, N)
Undocumented in source.
dataType
alias dataType = T
Undocumented in source.
isNormalised
alias isNormalised = isNormalized
Undocumented in source.
normalise
alias normalise = normalize
Undocumented in source.

Functions

abs
void abs()

Abs vector values

ceil
void ceil()

Ceils vector values

clamp
void clamp(VecType p_min, VecType p_max)

Clamps vector values

copyof
VecType copyof()
Undocumented in source. Be warned that the author may not have intended to support it.
distanceSquaredTo
T distanceSquaredTo(VecType b)

Returns squared distance from vector to b

distanceTo
T distanceTo(VecType b)

Calculates distance to vector b

dot
float dot(VecType b)

Performs dot product

floor
void floor()

Floors vector values

isClose
bool isClose(VecType v)

Is vector approximately close to v

isNormalized
bool isNormalized()

Returns true if vector is normalised

length
T length()

Returns vector length

lengthSquared
T lengthSquared()

Returns squared vector length

lerp
void lerp(VecType to, T weight)

Linear interpolates vector

limitLength
void limitLength(T p_len)

Limits vector length

max
void max(VecType b)

Clamps vector values to max

min
void min(VecType b)

Clamps vector values to min

normalize
void normalize()

Normalises vector

opBinary
auto opBinary(Vector!(R, N) b)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(R b)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
auto opBinaryRight(Vector!(R, N) b)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
auto opBinaryRight(R b)
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
int opCmp(Vector!(R, N) b)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Vector!(R, size) b)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
auto opOpAssign(Vector!(R, N) b)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
auto opOpAssign(R b)
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
auto opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
ptr
T* ptr()
Undocumented in source. Be warned that the author may not have intended to support it.
round
void round()

Rounds vector values

sign
void sign()

Signs current vector

snap
void snap(VecType p_step)

Snaps vector values

toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

AccessString
enum AccessString;
Undocumented in source.
AccessString
enum AccessString;
Undocumented in source.
AccessString
enum AccessString;
Undocumented in source.

Mixins

__anonymous
mixin accessByString!(T, N, "data", AccessString)
Undocumented in source.

Variables

data
T[N] data;
Undocumented in source.
size
enum size_t size;
Undocumented in source.

Mixed In Members

From mixin accessByString!(T, N, "data", AccessString)

opDispatch
T opDispatch [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
opDispatch
T opDispatch [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
opDispatch
auto opDispatch [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
opDispatch
U opDispatch [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta