selery.math.vector

Members

Aliases

BlockAxis
alias BlockAxis = ClassicBlockBox!(EntityPosition.Type)
Undocumented in source.
BlockPosition
alias BlockPosition = Vector3!int

Vectors usually used by Minecraft

ChunkPosition
alias ChunkPosition = Vector2!int

Vectors usually used by Minecraft

EntityAxis
alias EntityAxis = ClassicEntityBox!(EntityPosition.Type)
Undocumented in source.
EntityPosition
alias EntityPosition = Vector3!double

Vectors usually used by Minecraft

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.

Classes

Box
class Box(T)
Undocumented in source.
ClassicBlockBox
class ClassicBlockBox(T)
Undocumented in source.
ClassicBox
class ClassicBox(T)
Undocumented in source.
ClassicEntityBox
class ClassicEntityBox(T)
Undocumented in source.

Enums

Face
enum Face
Undocumented in source.

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.

conv
To conv(From from)
Undocumented in source. Be warned that the author may not have intended to support it.
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.

tuple
deprecated T tuple(V vector)
Undocumented in source. Be warned that the author may not have intended to support it.
vector
auto vector(E args)

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

vector
deprecated V vector(T tuple)

Properties

blockPosition
BlockPosition blockPosition [@property getter]

Casts an EntityPosition to a BlockPosition using vector's opCast.

blockPositionShort
BlockPosition blockPositionShort [@property getter]

Gets a BlockPosition from an ushort that indicates a position in a chunk.

entityPosition
EntityPosition entityPosition [@property getter]

Casts a BlockPosition to an EntityPosition using vector's opCast.

face
BlockPosition face [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
shortBlockPosition
ushort shortBlockPosition [@property getter]

Gets a ushort that indicates a position in a chunk.

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