Documentation
¶
Index ¶
- func Abs(x float32) float32
- func FastCbrt(x float32) float32
- func FastCoerceIn[T ~float32 | ~int](value, min, max T) T
- func FastCoerceInInt(value, min, max int) int
- func FloatToHalf(f float32) uint16
- func HalfToFloat(h uint16) float32
- func Inverse3x3(m []float32) []float32
- func Mul3x3(lhs, rhs []float32) []float32
- func Mul3x3Float3(m []float32, v []float32) []float32
- func PackFloats(v1, v2 float32) int64
- func PackInts(val1, val2 int32) int64
- func Pow(x, y float32) float32
- func UnpackInt1(value int64) int32
- func UnpackInt2(value int64) int32
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FastCoerceIn ¶
FastCoerceIn clamps the value between min and max.
func FastCoerceInInt ¶
FastCoerceInInt clamps integer value between min and max.
func FloatToHalf ¶
FloatToHalf converts a float32 to a half-precision float (float16) represented as uint16.
func HalfToFloat ¶
HalfToFloat converts a half-precision float (float16) represented as uint16 to float32.
func Inverse3x3 ¶
Inverse3x3 returns the inverse of a 3x3 matrix.
func Mul3x3Float3 ¶
Mul3x3Float3 multiplies a 3x3 matrix (row-major flat array) by a 3-component vector. Result maps back to v.
func PackFloats ¶
PackFloats packs two float32 values into a single int64.
func UnpackInt1 ¶
UnpackInt1 returns the first packed int32 from an int64.
func UnpackInt2 ¶
UnpackInt2 returns the second packed int32 from an int64.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.