Module teraflop.math

Mathematics primitives.

See Also

The gfm library and its API documentation.

Functions

NameDescription
abs(a)
degrees(radians) Convert and angle from radians to degrees.
failedExtraction() Result of a failed extraction while executing rotationOf.
radians(degrees) Convert and angle from degrees to radians.
rotationOf(value) Extract the rotation transformation from the given matrix.
scale(a, scale)
scaleOf(value) Extract the scale transformation from the given matrix.
transform(a, transformation)
translate(a, offset)
translationOf(matrix) Extract the translation transformation from the given matrix.
unproject(source, viewProj) Projects a Vector from screen space into object space.
vulkanClipCorrection(invertY) Transformation matrix to correct for the Vulkan coordinate system. Vulkan clip space has inverted Y and half Z.

Structs

NameDescription
Size Size of an object.

Manifest constants

NameTypeDescription
back Backward unit vector, i.e. inverse of Z-forward.
down Down unit vector, i.e. inverse of Y-up.
forward Forward unit vector, i.e. Z-forward.
up Up unit vector, i.e. Y-up.

Aliases

NameTypeDescription
ray2f gfm.math.shapes.Ray!(float,2)
ray3f gfm.math.shapes.Ray!(float,3)