package
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Dec 13, 2017
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 21
Opens a new window with list of known importers.
Documentation
¶
Package f32 is a basic math library for float32.
Abs returns the absolute of v.
MaxOf returns the maximum value of all the arguments.
MinOf returns the minimum value of all the arguments.
Round rounds v to the nearest integer.
Examples:
Round(-0.9) = -1
Round(-0.1) = 0
Round(0.0) = 0
Round(0.1) = 0
Round(0.9) = 1
Sqrt returns the square root of v.
V3D is a three element vector of float32.
The elements are in the order X, Y, Z.
Add3D returns the element-wise addition of vector a and b.
Cross3D returns the cross product of vector a and b.
Sub3D returns the element-wise subtraction of vector b from a.
Magnitude returns the magnitude of the vector.
Normalize returns the normalized vector of v.
Scale returns the element-wise scaling of v with s.
SqrMagnitude returns the magnitude of the vector.
W returns a V4D with the first three elements set to v and the fourth set
to w.
V4D is a four element vector of float32.
The elements are in the order X, Y, Z, W.
Add4D returns the element-wise addition of vector a and b.
Sub4D returns the element-wise subtraction of vector b from a.
Magnitude returns the magnitude of the vector.
Normalize returns the normalized vector of v.
Scale returns the element-wise scaling of v with s.
SqrMagnitude returns the magnitude of the vector.
XYZ returns a V3D formed from first three elements of v.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.