Documentation
¶
Index ¶
- func Clamp(x, s, e float64) float64
- func Clamp8(x, a, b float64) uint8
- func ComplexToFloat(v []complex128) []float64
- func Convolve1D(dst, src, coeffs []float64, shape int) []float64
- func Cov1D(x, y []float64, ddof float64) float64
- func CubicBezier1D(t, p0, p1, p2, p3 float64) float64
- func Deg2Rad(d float64) float64
- func FFT1DC(dst, src []complex128)
- func FFT1DR(dst []complex128, src []float64)
- func FloatToComplex(v []float64) []complex128
- func IFFT1DC(dst, src []complex128)
- func IFFT1DR(dst []float64, src []complex128)
- func Lerp(t, a, b float64) float64
- func LinearController(curpos *float64, targetpos, acc, deacc, dt float64)
- func LinearRemap(x, a, b, c, d float64) float64
- func Maxs(x ...float64) float64
- func Mean(x []float64) float64
- func Median(x []float64) float64
- func Mins(x ...float64) float64
- func Multiple(a, m float64) float64
- func PearsonCorrelation1D(x, y []float64) float64
- func Rad2Deg(r float64) float64
- func RoundPrec(v float64, prec int) float64
- func Sample1D(f func(float64) float64, x0, x1 float64, n int) (p []float64, s float64)
- func Sample2D(f func(x, y float64) float64, x0, x1, y0, y1 float64, nx, ny int) (p []float64, sx, sy float64)
- func Saturate(x float64) float64
- func Sign(x float64) float64
- func SignStrict(x float64) float64
- func Simpson1D(f func(x float64) float64, start, end float64, n int) float64
- func Simpson2D(f func(x, y float64) float64, x0, x1, y0, y1 float64, m, n int) float64
- func Sinc(x float64) float64
- func Smoothstep(a, b, x float64) float64
- func Stddev(x []float64, ddof float64) float64
- func Unlerp(t, a, b float64) float64
- func Wrap(x, s, e float64) float64
- 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() float64
- 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() float64
- 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 float64) *Mat4
- func (m *Mat4) Identity() *Mat4
- func (m *Mat4) InfinitePerspective(fovy, aspect, near float64) *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 float64) *Mat4
- func (m *Mat4) Perspective(fovy, aspect, near, far float64) *Mat4
- func (m *Mat4) RotateX(r float64) *Mat4
- func (m *Mat4) RotateY(r float64) *Mat4
- func (m *Mat4) RotateZ(r float64) *Mat4
- func (m *Mat4) Row(n int) Vec4
- func (m *Mat4) Scale(sx, sy, sz float64) *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() float64
- func (m *Mat4) Transform(v Vec4) Vec4
- func (m *Mat4) Transform3(v Vec3) Vec3
- func (m *Mat4) Translate(tx, ty, tz float64) *Mat4
- func (m *Mat4) Translate3(p Vec3) *Mat4
- func (m *Mat4) Transpose() *Mat4
- func (m *Mat4) Viewport(x, y, w, h float64) *Mat4
- type Polar
- type Quat
- func (q Quat) Add(r Quat) Quat
- func (q Quat) AxisAngle() (v Vec3, r float64)
- func (q Quat) Conj() Quat
- func (q Quat) Dot(p Quat) float64
- func (q Quat) FromAxisAngle(v Vec3, r float64) Quat
- func (q Quat) FromEuler(pitch, yaw, roll float64) Quat
- func (q Quat) Inverse() Quat
- func (q Quat) Len() float64
- func (q Quat) Lerp(t float64, 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 float64) Quat
- func (q Quat) Scale(k float64) Quat
- func (q Quat) Slerp(t float64, p Quat) Quat
- func (q Quat) String() string
- func (q Quat) Sub(r Quat) Quat
- func (q Quat) Transform(v Vec4) Vec4
- func (q Quat) Transform3(v Vec3) Vec3
- 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() float64
- func (r Rectangle) Dx() float64
- func (r Rectangle) Dy() float64
- func (r Rectangle) Empty() bool
- func (r Rectangle) Expand(x, y float64) Rectangle
- func (r Rectangle) Expand2(v Vec2) Rectangle
- func (r Rectangle) Floor() Rectangle
- func (r Rectangle) In(s Rectangle) bool
- func (r Rectangle) Inset(n float64) 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 float64)
- 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 float64) Vec2
- func (p Vec2) Angle(q Vec2) float64
- func (p Vec2) Ceil() Vec2
- func (p Vec2) Clamp(s, e float64) Vec2
- func (p Vec2) Clamp2(s, e Vec2) Vec2
- func (p Vec2) Distance(q Vec2) float64
- func (p Vec2) DistanceSquared(q Vec2) float64
- func (p Vec2) Dot(q Vec2) float64
- func (p Vec2) Equals(q Vec2, eps float64) bool
- func (p Vec2) Floor() Vec2
- func (p Vec2) In(r Rectangle) bool
- func (p Vec2) Len() float64
- func (p Vec2) LenSquared() float64
- func (p Vec2) Lerp(t float64, q Vec2) Vec2
- func (p Vec2) Lerp2(t, q Vec2) Vec2
- func (p Vec2) Max(q Vec2) Vec2
- func (p Vec2) MaxComp() float64
- func (p Vec2) MaxScalar(k float64) Vec2
- func (p Vec2) Min(q Vec2) Vec2
- func (p Vec2) MinComp() float64
- func (p Vec2) MinScalar(k float64) 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 float64) Vec2
- func (p Vec2) Scale(k float64) Vec2
- func (p Vec2) Scale2(q Vec2) Vec2
- func (p Vec2) Shear(k float64) Vec2
- func (p Vec2) Shearv(q Vec2) Vec2
- func (p Vec2) Shrink(k float64) 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 float64) Vec2
- func (p Vec2) Vec3() Vec3
- func (p Vec2) Wrap(s, e float64) 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 float64) Vec3
- func (p Vec3) Angle(q Vec3) float64
- func (p Vec3) Clamp(s, e float64) 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) float64
- func (p Vec3) DistanceSquared(q Vec3) float64
- func (p Vec3) Dot(q Vec3) float64
- func (p Vec3) Equals(q Vec3, eps float64) bool
- func (p Vec3) Len() float64
- func (p Vec3) LenSquared() float64
- func (p Vec3) Lerp(t float64, q Vec3) Vec3
- func (p Vec3) Max(q Vec3) Vec3
- func (p Vec3) MaxComp() float64
- func (p Vec3) MaxScalar(k float64) Vec3
- func (p Vec3) Min(q Vec3) Vec3
- func (p Vec3) MinComp() float64
- func (p Vec3) MinScalar(k float64) 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 float64) Vec3
- func (p Vec3) Scale(k float64) Vec3
- func (p Vec3) Scale3(q Vec3) Vec3
- func (p Vec3) Shrink(k float64) 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 float64) 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 float64) Vec4
- func (p Vec4) Angle(q Vec4) float64
- func (p Vec4) Dot(q Vec4) float64
- func (p Vec4) Floor() Vec4
- func (p Vec4) Len() float64
- func (p Vec4) Normalize() Vec4
- func (p Vec4) PerspectiveDivide() Vec4
- func (p Vec4) RGBA() (r, g, b, a uint32)
- func (p Vec4) Scale(k float64) Vec4
- func (p Vec4) Scale4(q Vec4) Vec4
- func (p Vec4) Shrink(k float64) 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 float64) 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 ComplexToFloat(v []complex128) []float64
func Convolve1D ¶
func CubicBezier1D ¶
func FFT1DC ¶
func FFT1DC(dst, src []complex128)
func FFT1DR ¶
func FFT1DR(dst []complex128, src []float64)
func FloatToComplex ¶
func FloatToComplex(v []float64) []complex128
func IFFT1DC ¶
func IFFT1DC(dst, src []complex128)
func IFFT1DR ¶
func IFFT1DR(dst []float64, src []complex128)
func LinearController ¶
func LinearRemap ¶
func PearsonCorrelation1D ¶
func SignStrict ¶
func Smoothstep ¶
Types ¶
type Mat4 ¶
type Mat4 [4][4]float64
func (*Mat4) FromBasis3 ¶
func (*Mat4) InfinitePerspective ¶
func (*Mat4) Perspective ¶
func (*Mat4) Transform3 ¶
func (*Mat4) Translate3 ¶
type Vec2 ¶
type Vec2 struct {
X, Y float64
}
func (Vec2) DistanceSquared ¶
func (Vec2) LenSquared ¶
type Vec3 ¶
type Vec3 struct {
X, Y, Z float64
}
func TriangleBarycentric ¶
func (Vec3) CrossNormalize ¶
func (Vec3) DistanceSquared ¶
func (Vec3) LenSquared ¶
Click to show internal directories.
Click to hide internal directories.