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