Documentation
¶
Index ¶
- Constants
- Variables
- func Abs32(f float32) float32
- func AbsInt32(x int32) int32
- func Acos32(x float32) float32
- func AlignUp[Int constraints.Integer](len Int, alignment Int) Int
- func Asin32(x float32) float32
- func Atan232(y, x float32) float32
- func Cbrt32(x float32) float32
- func Ceil32(f float32) float32
- func Clamp[T constraints.Integer | constraints.Float](x, minv, maxv T) T
- func Copysign32(f, sign float32) float32
- func Cos32(x float32) float32
- func Float16frombits(val Float16) float32
- func Floor32(f float32) float32
- func Hypot32(a, b float32) float32
- func PointToF32(p curve.Point) [2]float32
- func Pow32(x, y float32) float32
- func Round32(f float32) float32
- func Sin32(x float32) float32
- func Sincos32(x float32) (float32, float32)
- func Sqrt32(f float32) float32
- type Float16
- type Transform
Constants ¶
View Source
const Epsilon = 1e-12
Variables ¶
View Source
var Identity = Transform{ Matrix: [4]float32{1, 0, 0, 1}, }
Functions ¶
func AlignUp ¶
func AlignUp[Int constraints.Integer](len Int, alignment Int) Int
func Clamp ¶
func Clamp[T constraints.Integer | constraints.Float](x, minv, maxv T) T
func Copysign32 ¶
func Float16frombits ¶
Float16frombits converts a 16-bit precision IEEE-754 binary16 float to float32.
This implementation was adapted from Fabian Giesen's `half_to_float()` function which can be found at <https://gist.github.com/rygorous/2156668#file-gistfile1-cpp-L574>
func PointToF32 ¶
Types ¶
type Float16 ¶
type Float16 = uint16
func Float16bits ¶
Float16bits converts a float32 to IEEE-754 binary16 format represented as the bits of a u16. This implementation was adapted from Fabian Giesen's `float_to_half_fast3`() function which can be found at <https://gist.github.com/rygorous/2156668#file-gistfile1-cpp-L285>
Click to show internal directories.
Click to hide internal directories.