Documentation
¶
Index ¶
- func Abs(x float32) float32
- func Acos(x float32) float32
- func Atan2(y, x float32) float32
- func Ceil(x float32) float32
- func Clamp(x, s, e float32) float32
- func Clamp8(x, a, b float32) uint8
- func ComplexToFloat(v []complex64) []float32
- func Convolve1D(dst, src, coeffs []float32, shape int) []float32
- func Cos(x float32) float32
- func Cosh(x float32) float32
- func Cov1D(x, y []float32, ddof float32) float32
- func CubicBezier1D(t, p0, p1, p2, p3 float32) float32
- func Deg2Rad(d float32) float32
- func Exp(x float32) float32
- func FFT1DC(dst, src []complex64)
- func FFT1DR(dst []complex64, src []float32)
- func FloatToComplex(v []float32) []complex64
- func Floor(x float32) float32
- func Hypot(x, y float32) float32
- func IFFT1DC(dst, src []complex64)
- func IFFT1DR(dst []float32, src []complex64)
- func Lerp(t, a, b float32) float32
- func LinearController(curpos *float32, targetpos, acc, deacc, dt float32)
- func LinearRemap(x, a, b, c, d float32) float32
- func Log(x float32) float32
- func Log1b(x float32) float32
- func Log1p(x float32) float32
- func Log2(x float32) float32
- func Log10(x float32) float32
- func Max(a, b float32) float32
- func Maxs(x ...float32) float32
- func Mean(x []float32) float32
- func Median(x []float32) float32
- func Min(a, b float32) float32
- func Mins(x ...float32) float32
- func Mod(x, y float32) float32
- func Multiple(a, m float32) float32
- func PearsonCorrelation1D(x, y []float32) float32
- func Pow(x, y float32) float32
- func Pow10(x int) float32
- func Rad2Deg(r float32) float32
- func Round(x float32) float32
- func RoundPrec(v float32, prec int) float32
- func Sample1D(f func(float32) float32, x0, x1 float32, n int) (p []float32, s float32)
- func Sample2D(f func(x, y float32) float32, x0, x1, y0, y1 float32, nx, ny int) (p []float32, sx, sy float32)
- func Saturate(x float32) float32
- func Sign(x float32) float32
- func SignNZ(x float32) float32
- func Simpson1D(f func(x float32) float32, start, end float32, n int) float32
- func Simpson2D(f func(x, y float32) float32, x0, x1, y0, y1 float32, m, n int) float32
- func Sin(x float32) float32
- func Sinc(x float32) float32
- func Sincos(x float32) (si, co float32)
- func Sinh(x float32) float32
- func Smoothstep(a, b, x float32) float32
- func Sqrt(x float32) float32
- func Stddev(x []float32, ddof float32) float32
- func Tan(x float32) float32
- func Tanh(x float32) float32
- func Trunc(x float32) float32
- func Unlerp(t, a, b float32) float32
- func Wrap(x, s, e float32) float32
- type Circle
- type Mat2
- type Mat3
- func (m *Mat3) Basis() (X, Y, Z, W Vec3)
- func (m *Mat3) Col(n int) Vec3
- func (m *Mat3) Det() float32
- func (m *Mat3) FromBasis(X, Y, Z Vec3) *Mat3
- func (m *Mat3) Identity() *Mat3
- func (m *Mat3) Inverse() *Mat3
- func (m *Mat3) Mat4() Mat4
- func (m *Mat3) Mul(a, b *Mat3) *Mat3
- func (m *Mat3) Row(n int) Vec3
- func (m *Mat3) SetCol(n int, p Vec3)
- func (m *Mat3) SetRow(n int, p Vec3)
- func (m Mat3) String() string
- func (m *Mat3) Trace() float32
- func (m *Mat3) Transform(p Vec3) Vec3
- func (m *Mat3) Transpose() *Mat3
- type Mat4
- func (m *Mat4) Add(a, b *Mat4) *Mat4
- func (m *Mat4) Basis() (X, Y, Z, W Vec4)
- func (m *Mat4) Basis3() (X, Y, Z, W Vec3)
- func (m *Mat4) Col(n int) Vec4
- func (m *Mat4) FromBasis(X, Y, Z, W Vec4) *Mat4
- func (m *Mat4) FromBasis3(X, Y, Z, W Vec3) *Mat4
- func (m *Mat4) Frustum(l, r, b, t, n, f float32) *Mat4
- func (m *Mat4) Identity() *Mat4
- func (m *Mat4) InfinitePerspective(fovy, aspect, near float32) *Mat4
- func (m *Mat4) Inverse() *Mat4
- func (m *Mat4) LookAt(eye, center, up Vec3) *Mat4
- func (m *Mat4) Mul(a, b *Mat4) *Mat4
- func (m *Mat4) Ortho(l, r, b, t, n, f float32) *Mat4
- func (m *Mat4) Perspective(fovy, aspect, near, far float32) *Mat4
- func (m *Mat4) RotateX(r float32) *Mat4
- func (m *Mat4) RotateY(r float32) *Mat4
- func (m *Mat4) RotateZ(r float32) *Mat4
- func (m *Mat4) Row(n int) Vec4
- func (m *Mat4) Scale(sx, sy, sz float32) *Mat4
- func (m *Mat4) Scale3(p Vec3) *Mat4
- func (m *Mat4) SetCol(n int, p Vec4)
- func (m *Mat4) SetRow(n int, p Vec4)
- func (m Mat4) String() string
- func (m *Mat4) Sub(a, b *Mat4) *Mat4
- func (m *Mat4) Trace() float32
- func (m *Mat4) Transform(v Vec4) Vec4
- func (m *Mat4) Transform3(v Vec3) Vec3
- func (m *Mat4) Translate(tx, ty, tz float32) *Mat4
- func (m *Mat4) Translate3(p Vec3) *Mat4
- func (m *Mat4) Transpose() *Mat4
- func (m *Mat4) Viewport(x, y, w, h float32) *Mat4
- type Polar
- type Quat
- func (q Quat) Add(r Quat) Quat
- func (q Quat) AxisAngle() (v Vec3, r float32)
- func (q Quat) Conj() Quat
- func (q Quat) Dot(p Quat) float32
- func (q Quat) FromAxisAngle(v Vec3, r float32) Quat
- func (q Quat) FromEuler(pitch, yaw, roll float32) Quat
- func (q Quat) Inverse() Quat
- func (q Quat) Len() float32
- func (q Quat) Lerp(t float32, p Quat) Quat
- func (q Quat) Mat3() Mat3
- func (q Quat) Mat4() Mat4
- func (q Quat) Mul(r Quat) Quat
- func (q Quat) Neg() Quat
- func (q Quat) Normalize() Quat
- func (q Quat) Powu(p float32) Quat
- func (q Quat) Scale(k float32) Quat
- func (q Quat) Slerp(t float32, p Quat) Quat
- func (q Quat) String() string
- func (q Quat) Sub(r Quat) Quat
- func (q Quat) Transform3(v Vec3) Vec3
- func (q Quat) Transform4(v Vec4) Vec4
- type Rectangle
- func (r Rectangle) Add(p Vec2) Rectangle
- func (r Rectangle) BL() Vec2
- func (r Rectangle) BR() Vec2
- func (r Rectangle) Canon() Rectangle
- func (r Rectangle) Center() Vec2
- func (r Rectangle) Diagonal() float32
- func (r Rectangle) Dx() float32
- func (r Rectangle) Dy() float32
- func (r Rectangle) Empty() bool
- func (r Rectangle) Expand(x, y float32) Rectangle
- func (r Rectangle) Expand2(v Vec2) Rectangle
- func (r Rectangle) In(s Rectangle) bool
- func (r Rectangle) Inset(n float32) Rectangle
- func (r Rectangle) Int() image.Rectangle
- func (r Rectangle) Intersect(s Rectangle) Rectangle
- func (r Rectangle) Inverted() bool
- func (r Rectangle) Overlaps(s Rectangle) bool
- func (r Rectangle) PosSize() (x, y, w, h float32)
- func (r Rectangle) Scale(s Vec2) Rectangle
- func (r Rectangle) Size() Vec2
- func (r Rectangle) Sub(p Vec2) Rectangle
- func (r Rectangle) TL() Vec2
- func (r Rectangle) TR() Vec2
- func (r Rectangle) Union(s Rectangle) Rectangle
- type Spherical
- type Vec2
- func (p Vec2) Abs() Vec2
- func (p Vec2) Add(q Vec2) Vec2
- func (p Vec2) AddScale(q Vec2, t float32) Vec2
- func (p Vec2) Angle(q Vec2) float32
- func (p Vec2) Ceil() Vec2
- func (p Vec2) Clamp(s, e float32) Vec2
- func (p Vec2) Clamp2(s, e Vec2) Vec2
- func (p Vec2) Distance(q Vec2) float32
- func (p Vec2) DistanceSquared(q Vec2) float32
- func (p Vec2) Dot(q Vec2) float32
- func (p Vec2) Equals(q Vec2, eps float32) bool
- func (p Vec2) Floor() Vec2
- func (p Vec2) In(r Rectangle) bool
- func (p Vec2) Len() float32
- func (p Vec2) LenSquared() float32
- func (p Vec2) Lerp(t float32, q Vec2) Vec2
- func (p Vec2) Lerp2(t, q Vec2) Vec2
- func (p Vec2) Max(q Vec2) Vec2
- func (p Vec2) MaxComp() float32
- func (p Vec2) MaxScalar(k float32) Vec2
- func (p Vec2) Min(q Vec2) Vec2
- func (p Vec2) MinComp() float32
- func (p Vec2) MinScalar(k float32) Vec2
- func (p Vec2) Neg() Vec2
- func (p Vec2) Normalize() Vec2
- func (p Vec2) OnLine(a, b Vec2) bool
- func (p Vec2) Point3() Vec3
- func (p Vec2) Polar() Polar
- func (p Vec2) Rotate(r float32) Vec2
- func (p Vec2) Scale(k float32) Vec2
- func (p Vec2) Scale2(q Vec2) Vec2
- func (p Vec2) Shear(k float32) Vec2
- func (p Vec2) Shearv(q Vec2) Vec2
- func (p Vec2) Shrink(k float32) Vec2
- func (p Vec2) Shrink2(q Vec2) Vec2
- func (p Vec2) String() string
- func (p Vec2) Sub(q Vec2) Vec2
- func (p Vec2) SubScale(q Vec2, t float32) Vec2
- func (p Vec2) Vec3() Vec3
- func (p Vec2) Wrap(s, e float32) Vec2
- func (p Vec2) YX() Vec2
- type Vec3
- func (p Vec3) Abs() Vec3
- func (p Vec3) Add(q Vec3) Vec3
- func (p Vec3) AddScale(q Vec3, t float32) Vec3
- func (p Vec3) Angle(q Vec3) float32
- func (p Vec3) Clamp(s, e float32) Vec3
- func (p Vec3) Clamp3(s, e Vec3) Vec3
- func (p Vec3) Cross(q Vec3) Vec3
- func (p Vec3) CrossNormalize(q Vec3) Vec3
- func (p Vec3) Distance(q Vec3) float32
- func (p Vec3) DistanceSquared(q Vec3) float32
- func (p Vec3) Dot(q Vec3) float32
- func (p Vec3) Equals(q Vec3, eps float32) bool
- func (p Vec3) Len() float32
- func (p Vec3) LenSquared() float32
- func (p Vec3) Lerp(t float32, q Vec3) Vec3
- func (p Vec3) Max(q Vec3) Vec3
- func (p Vec3) MaxComp() float32
- func (p Vec3) MaxScalar(k float32) Vec3
- func (p Vec3) Min(q Vec3) Vec3
- func (p Vec3) MinComp() float32
- func (p Vec3) MinScalar(k float32) Vec3
- func (p Vec3) Neg() Vec3
- func (p Vec3) Normalize() Vec3
- func (p Vec3) Point4() Vec4
- func (p Vec3) RGBA() (r, g, b, a uint32)
- func (p Vec3) Reflect(q Vec3) Vec3
- func (p Vec3) Refract(q Vec3, eta float32) Vec3
- func (p Vec3) Scale(k float32) Vec3
- func (p Vec3) Scale3(q Vec3) Vec3
- func (p Vec3) Shrink(k float32) Vec3
- func (p Vec3) Shrink3(q Vec3) Vec3
- func (p Vec3) Spherical() Spherical
- func (p Vec3) String() string
- func (p Vec3) Sub(q Vec3) Vec3
- func (p Vec3) SubScale(q Vec3, t float32) Vec3
- func (p Vec3) ToRGBA() color.RGBA
- func (p Vec3) Vec4() Vec4
- func (p Vec3) XY() Vec2
- func (p Vec3) XZ() Vec2
- func (p Vec3) YX() Vec2
- func (p Vec3) YZ() Vec2
- func (p Vec3) ZX() Vec2
- func (p Vec3) ZY() Vec2
- type Vec4
- func (p Vec4) Add(q Vec4) Vec4
- func (p Vec4) AddScale(q Vec4, k float32) Vec4
- func (p Vec4) Angle(q Vec4) float32
- func (p Vec4) Dot(q Vec4) float32
- func (p Vec4) Len() float32
- func (p Vec4) Normalize() Vec4
- func (p Vec4) PerspectiveDivide() Vec4
- func (p Vec4) RGBA() (r, g, b, a uint32)
- func (p Vec4) Scale(k float32) Vec4
- func (p Vec4) Scale4(q Vec4) Vec4
- func (p Vec4) Shrink(k float32) Vec4
- func (p Vec4) Shrink4(q Vec4) Vec4
- func (p Vec4) String() string
- func (p Vec4) Sub(q Vec4) Vec4
- func (p Vec4) SubScale(q Vec4, k float32) Vec4
- func (p Vec4) ToRGBA() color.RGBA
- func (p Vec4) XYZ() Vec3
- func (p Vec4) XZY() Vec3
- func (p Vec4) YXZ() Vec3
- func (p Vec4) YZX() Vec3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComplexToFloat ¶
func Convolve1D ¶
func CubicBezier1D ¶
func FloatToComplex ¶
func LinearController ¶
func LinearRemap ¶
func PearsonCorrelation1D ¶
func Smoothstep ¶
Types ¶
type Mat4 ¶
type Mat4 [4][4]float32
func (*Mat4) FromBasis3 ¶
func (*Mat4) InfinitePerspective ¶
func (*Mat4) Perspective ¶
func (*Mat4) Transform3 ¶
func (*Mat4) Translate3 ¶
type Quat ¶
type Quat struct {
X, Y, Z, W float32
}
func (Quat) Transform3 ¶
func (Quat) Transform4 ¶
type Vec2 ¶
type Vec2 struct {
X, Y float32
}
func (Vec2) DistanceSquared ¶
func (Vec2) LenSquared ¶
type Vec3 ¶
type Vec3 struct {
X, Y, Z float32
}
func TriangleBarycentric ¶
func (Vec3) CrossNormalize ¶
func (Vec3) DistanceSquared ¶
func (Vec3) LenSquared ¶
Click to show internal directories.
Click to hide internal directories.