Documentation
¶
Index ¶
- Constants
- func Abs(v int32) int32
- func Acos(x int32) int32
- func AcosFast(x int32) int32
- func AcosFastest(x int32) int32
- func Add(a, b int32) int32
- func Asin(x int32) int32
- func AsinFast(x int32) int32
- func AsinFastest(x int32) int32
- func Atan(x int32) int32
- func Atan2(y, x int32) int32
- func Atan2Div(y, x int32) int32
- func Atan2DivFast(y, x int32) int32
- func Atan2DivFastest(y, x int32) int32
- func Atan2Fast(y, x int32) int32
- func Atan2Fastest(y, x int32) int32
- func AtanFast(x int32) int32
- func AtanFastest(x int32) int32
- func Ceil(v int32) int32
- func CeilToInt(v int32) int32
- func Clamp(a, min, max int32) int32
- func Cos(x int32) int32
- func CosFast(x int32) int32
- func CosFastest(x int32) int32
- func Div(a, b int32) int32
- func DivFast(a, b int32) int32
- func DivFastest(a, b int32) int32
- func DivPrecise(a, b int32) int32
- func Exp(x int32) int32
- func Exp2(x int32) int32
- func Exp2Fast(x int32) int32
- func Exp2Fastest(x int32) int32
- func ExpFast(x int32) int32
- func ExpFastest(x int32) int32
- func Floor(v int32) int32
- func FloorToInt(v int32) int32
- func Fract(v int32) int32
- func FromFloat32(v float32) int32
- func FromFloat64(v float64) int32
- func FromInt32(v int32) int32
- func Lerp(a, b, t int32) int32
- func Log(x int32) int32
- func Log2(x int32) int32
- func Log2Fast(x int32) int32
- func Log2Fastest(x int32) int32
- func LogFast(x int32) int32
- func LogFastest(x int32) int32
- func Max(a, b int32) int32
- func Min(a, b int32) int32
- func Mod(a, b int32) int32
- func Mul(a, b int32) int32
- func Nabs(v int32) int32
- func Nlz(v uint32) int32
- func Pow(x, exponent int32) int32
- func PowFast(x, exponent int32) int32
- func PowFastest(x, exponent int32) int32
- func RSqrt(x int32) int32
- func RSqrtFast(x int32) int32
- func RSqrtFastest(x int32) int32
- func Rcp(x int32) int32
- func RcpFast(x int32) int32
- func RcpFastest(x int32) int32
- func Round(v int32) int32
- func RoundToInt(v int32) int32
- func Sign(v int32) int32
- func Sin(x int32) int32
- func SinFast(x int32) int32
- func SinFastest(x int32) int32
- func Sqrt(x int32) int32
- func SqrtFast(x int32) int32
- func SqrtFastest(x int32) int32
- func SqrtPrecise(a int32) int32
- func Sub(a, b int32) int32
- func Tan(x int32) int32
- func TanFast(x int32) int32
- func TanFastest(x int32) int32
- func ToFloat32(v int32) float32
- func ToFloat64(v int32) float64
- func ToString(v int32) string
- func UnitSin(z int32) int32
- func UnitSinFast(z int32) int32
- func UnitSinFastest(z int32) int32
Constants ¶
View Source
const ( Shift int32 = 16 FractionMask int32 = (1 << Shift) - 1 IntegerMask = ^FractionMask )
View Source
const ( Zero int32 = 0 Neg1 int32 = -1 << Shift One int32 = 1 << Shift Two int32 = 2 << Shift Three int32 = 3 << Shift Four int32 = 4 << Shift Half = One >> 1 Pi = int32(13493037705 >> 16) // (int32)(Math.PI * 65536.0) << 16 Pi2 = int32(26986075409 >> 16) PiHalf = int32(6746518852 >> 16) E = int32(11674931555 >> 16) )
Constants
View Source
const ( MinValue int32 = -2147483648 MaxValue int32 = 2147483647 )
View Source
const ( RcpLn2 = int32(0x171547652 >> 16) // 1.0 / log(2.0) ~= 1.4426950408889634 RcpLog2E = int32(2977044471 >> 16) // 1.0 / log2(e) ~= 0.6931471805599453 RcpTwoPi int32 = 683565276 // 1.0 / (4.0 * 0.5 * pi); -- the 4.0 factor converts directly to s2.30 )
Private constants
Variables ¶
This section is empty.
Functions ¶
func AcosFastest ¶
func AsinFastest ¶
func Atan2DivFast ¶
func Atan2DivFastest ¶
func Atan2Fastest ¶
func AtanFastest ¶
func CeilToInt ¶
CeilToInt Converts a fixed-point value into an integer by rounding it up to nearest integer.
func CosFastest ¶
func ExpFastest ¶
func FloorToInt ¶
FloorToInt Converts a fixed-point value into an integer by rounding it down to nearest integer.
func FromFloat32 ¶
FromFloat32 Converts a float32 to a fp-point value.
func FromFloat64 ¶
FromFloat64 Converts a float64 to a fp-point value.
func Log2Fastest ¶
func LogFastest ¶
func PowFastest ¶
PowFastest Calculates x to the power of the exponent.
func RSqrtFastest ¶
RSqrtFastest Calculates the reciprocal square root.
func RoundToInt ¶
RoundToInt Converts a fixed-point value into an integer by rounding it to nearest integer.
func SinFastest ¶
func SqrtFastest ¶
func SqrtPrecise ¶
SqrtPrecise Calculates the square root of the given number.
func TanFastest ¶
func UnitSinFast ¶
func UnitSinFastest ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.