Versions in this module Expand all Collapse all v0 v0.1.0 Aug 14, 2026 Changes in this version + const DegreesToRadians + const E + const FeetToMillimeters + const HalfPi + const Log10E + const Log2E + const MillimetersToFeet + const OneTenthOfADegree + const Pi + const RadiansToDegrees + const Tolerance + const TwoPi + func CatmullRom(value1, value2, value3, value4, amount float32) float32 + func CombineHash(first, second int32) int32 + func Coplanar(a, b, c, d Vec3, tolerance float32) bool + func HashInts(values ...int32) int32 + func Hermite(value1, tangent1, value2, tangent2, amount float32) float32 + func IsNonZeroAndValid(value, tolerance float32) bool + func NearestPowerOfTwo(value int32) (int32, bool) + func Percentage(denominator, numerator float64) float64 + func RandomFloat(minimum, maximum float32, index, seed int32) float32 + func RandomInt(index, seed int32) int32 + func RandomUint(index, seed int32) uint32 + func RandomUnitFloat(index, seed int32) float32 + func SmoothStep(value1, value2, amount float32) float32 + func Smoothstep(x float64) float64 + func StatsAverage[T statsVector](stats Stats[T]) (T, bool) + func StatsExtents[T statsVector](stats Stats[T]) T + func StatsMiddle[T statsVector](stats Stats[T]) T + func ToDegrees(radians float64) float64 + func ToRadians(degrees float64) float64 + func Version() string + func WrapAngle(angle float32) float32 + type AxisAngle struct + Angle float64 + Axis DVec3 + func NewAxisAngle(axis DVec3, angle float64) AxisAngle + func (a AxisAngle) AlmostEqual(other AxisAngle, tolerance float64) bool + type Box2 struct + Max Vec2 + Min Vec2 + func Box2FromPoints(points []Vec2) (Box2, bool) + func EmptyBox2() Box2 + func NewBox2(minimum, maximum Vec2) Box2 + func (b Box2) AlmostEqual(other Box2, tolerance float32) bool + func (b Box2) Center() Vec2 + func (b Box2) ContainsBox(other Box2) Containment + func (b Box2) ContainsPoint(point Vec2) bool + func (b Box2) Corners() [4]Vec2 + func (b Box2) Empty() bool + func (b Box2) Expanded(point Vec2) Box2 + func (b Box2) Extent() Vec2 + func (b Box2) Intersection(other Box2) (Box2, bool) + func (b Box2) Intersects(other Box2) bool + func (b Box2) Merge(other Box2) Box2 + func (b Box2) Translated(offset Vec2) Box2 + func (b Box2) Valid() bool + type Box3 struct + Max Vec3 + Min Vec3 + func Box3FromPoints(points []Vec3) (Box3, bool) + func EmptyBox3() Box3 + func NewBox3(minimum, maximum Vec3) Box3 + func (b Box3) AlmostEqual(other Box3, tolerance float32) bool + func (b Box3) Center() Vec3 + func (b Box3) ContainsBox(other Box3) Containment + func (b Box3) ContainsPoint(point Vec3) bool + func (b Box3) ContainsSphere(sphere Sphere) Containment + func (b Box3) Corners() [8]Vec3 + func (b Box3) DBox3() DBox3 + func (b Box3) Empty() bool + func (b Box3) Expanded(point Vec3) Box3 + func (b Box3) Extent() Vec3 + func (b Box3) Intersection(other Box3) (Box3, bool) + func (b Box3) Intersects(other Box3) bool + func (b Box3) IntersectsPlane(plane Plane) PlaneIntersection + func (b Box3) IntersectsSphere(sphere Sphere) bool + func (b Box3) Merge(other Box3) Box3 + func (b Box3) Transformed(matrix Mat4) (Box3, bool) + func (b Box3) Translated(offset Vec3) Box3 + func (b Box3) Valid() bool + type Box4 struct + Max Vec4 + Min Vec4 + func EmptyBox4() Box4 + func NewBox4(minimum, maximum Vec4) Box4 + func (b Box4) AlmostEqual(other Box4, tolerance float32) bool + func (b Box4) Center() Vec4 + func (b Box4) Empty() bool + func (b Box4) Expanded(point Vec4) Box4 + func (b Box4) Extent() Vec4 + func (b Box4) Intersection(other Box4) (Box4, bool) + func (b Box4) Merge(other Box4) Box4 + func (b Box4) Valid() bool + type Byte2 struct + X byte + Y byte + func NewByte2(x, y byte) Byte2 + type Byte3 struct + X byte + Y byte + Z byte + func NewByte3(x, y, z byte) Byte3 + type Byte4 struct + W byte + X byte + Y byte + Z byte + func NewByte4(x, y, z, w byte) Byte4 + type Complex struct + Imaginary float64 + Real float64 + func ComplexFrom128(value complex128) Complex + func NewComplex(real, imaginary float64) Complex + func (c Complex) AlmostEqual(other Complex, tolerance float64) bool + func (c Complex) Complex128() complex128 + type Containment uint8 + const ContainmentContains + const ContainmentDisjoint + const ContainmentIntersects + type Cylindrical struct + Azimuth float64 + Height float64 + Radius float64 + func NewCylindrical(radius, azimuth, height float64) Cylindrical + func (v Cylindrical) AlmostEqual(other Cylindrical, tolerance float64) bool + type DBox2 struct + Max DVec2 + Min DVec2 + func EmptyDBox2() DBox2 + func NewDBox2(minimum, maximum DVec2) DBox2 + func (b DBox2) AlmostEqual(other DBox2, tolerance float64) bool + func (b DBox2) Center() DVec2 + func (b DBox2) Empty() bool + func (b DBox2) Expanded(point DVec2) DBox2 + func (b DBox2) Extent() DVec2 + func (b DBox2) Intersection(other DBox2) (DBox2, bool) + func (b DBox2) Merge(other DBox2) DBox2 + func (b DBox2) Valid() bool + type DBox3 struct + Max DVec3 + Min DVec3 + func EmptyDBox3() DBox3 + func NewDBox3(minimum, maximum DVec3) DBox3 + func (b DBox3) AlmostEqual(other DBox3, tolerance float64) bool + func (b DBox3) Box3() Box3 + func (b DBox3) Center() DVec3 + func (b DBox3) ContainsPoint(point DVec3) bool + func (b DBox3) Empty() bool + func (b DBox3) Expanded(point DVec3) DBox3 + func (b DBox3) Extent() DVec3 + func (b DBox3) Intersection(other DBox3) (DBox3, bool) + func (b DBox3) Merge(other DBox3) DBox3 + func (b DBox3) Valid() bool + type DBox4 struct + Max DVec4 + Min DVec4 + func EmptyDBox4() DBox4 + func NewDBox4(minimum, maximum DVec4) DBox4 + func (b DBox4) AlmostEqual(other DBox4, tolerance float64) bool + func (b DBox4) Center() DVec4 + func (b DBox4) Empty() bool + func (b DBox4) Expanded(point DVec4) DBox4 + func (b DBox4) Extent() DVec4 + func (b DBox4) Intersection(other DBox4) (DBox4, bool) + func (b DBox4) Merge(other DBox4) DBox4 + func (b DBox4) Valid() bool + type DInterval struct + Max float64 + Min float64 + func EmptyDInterval() DInterval + func NewDInterval(minimum, maximum float64) DInterval + func (i DInterval) AlmostEqual(other DInterval, tolerance float64) bool + func (i DInterval) Center() float64 + func (i DInterval) Empty() bool + func (i DInterval) Expanded(value float64) DInterval + func (i DInterval) Extent() float64 + func (i DInterval) Intersection(other DInterval) (DInterval, bool) + func (i DInterval) Merge(other DInterval) DInterval + func (i DInterval) Valid() bool + type DPlane struct + D float64 + Normal DVec3 + func DPlaneFromVec4(value DVec4) DPlane + func NewDPlane(normal DVec3, d float64) DPlane + func (p DPlane) AlmostEqual(other DPlane, tolerance float64) bool + func (p DPlane) DVec4() DVec4 + type DQuat struct + W float64 + X float64 + Y float64 + Z float64 + func DQuatFromVector(vector DVec3, scalar float64) DQuat + func IdentityDQuat() DQuat + func NewDQuat(x, y, z, w float64) DQuat + func (q DQuat) AlmostEqual(other DQuat, tolerance float64) bool + func (q DQuat) Quat() Quat + func (q DQuat) Vector() DVec3 + type DRay struct + Direction DVec3 + Origin DVec3 + func NewDRay(origin, direction DVec3) DRay + func (r DRay) AlmostEqual(other DRay, tolerance float64) bool + func (r DRay) IntersectBox(box DBox3) (float64, bool) + func (r DRay) IntersectSphere(sphere DSphere) (float64, bool) + func (r DRay) PointAt(t float64) DVec3 + type DSphere struct + Center DVec3 + Radius float64 + func NewDSphere(center DVec3, radius float64) DSphere + func (s DSphere) AlmostEqual(other DSphere, tolerance float64) bool + func (s DSphere) Bounds() DBox3 + func (s DSphere) ContainsPoint(point DVec3) Containment + func (s DSphere) Intersects(other DSphere) bool + func (s DSphere) Valid() bool + type DVec2 struct + X float64 + Y float64 + func DV2(x, y float64) DVec2 + func SplatDV2(v float64) DVec2 + func (v DVec2) Add(o DVec2) DVec2 + func (v DVec2) AlmostEqual(o DVec2, tolerance float64) bool + func (v DVec2) Cross(o DVec2) float64 + func (v DVec2) Div(o DVec2) DVec2 + func (v DVec2) Dot(o DVec2) float64 + func (v DVec2) IsFinite() bool + func (v DVec2) IsInf() bool + func (v DVec2) IsNaN() bool + func (v DVec2) Magnitude() float64 + func (v DVec2) MagnitudeSquared() float64 + func (v DVec2) Max(o DVec2) DVec2 + func (v DVec2) MaxComponent() float64 + func (v DVec2) Min(o DVec2) DVec2 + func (v DVec2) MinComponent() float64 + func (v DVec2) Mul(o DVec2) DVec2 + func (v DVec2) Negated() DVec2 + func (v DVec2) Normalized() (DVec2, bool) + func (v DVec2) ProductComponents() float64 + func (v DVec2) Scale(s float64) DVec2 + func (v DVec2) Sub(o DVec2) DVec2 + func (v DVec2) SumComponents() float64 + func (v DVec2) SumSquaredComponents() float64 + func (v DVec2) Vec2() Vec2 + type DVec3 struct + X float64 + Y float64 + Z float64 + func DV3(x, y, z float64) DVec3 + func SplatDV3(v float64) DVec3 + func (v DVec3) Add(o DVec3) DVec3 + func (v DVec3) AlmostEqual(o DVec3, tolerance float64) bool + func (v DVec3) Cross(o DVec3) DVec3 + func (v DVec3) Div(o DVec3) DVec3 + func (v DVec3) Dot(o DVec3) float64 + func (v DVec3) IsFinite() bool + func (v DVec3) IsInf() bool + func (v DVec3) IsNaN() bool + func (v DVec3) Magnitude() float64 + func (v DVec3) MagnitudeSquared() float64 + func (v DVec3) Max(o DVec3) DVec3 + func (v DVec3) MaxComponent() float64 + func (v DVec3) Min(o DVec3) DVec3 + func (v DVec3) MinComponent() float64 + func (v DVec3) Mul(o DVec3) DVec3 + func (v DVec3) Negated() DVec3 + func (v DVec3) Normalized() (DVec3, bool) + func (v DVec3) ProductComponents() float64 + func (v DVec3) Scale(s float64) DVec3 + func (v DVec3) Sub(o DVec3) DVec3 + func (v DVec3) SumComponents() float64 + func (v DVec3) SumSquaredComponents() float64 + func (v DVec3) Vec3() Vec3 + type DVec4 struct + W float64 + X float64 + Y float64 + Z float64 + func DV4(x, y, z, w float64) DVec4 + func SplatDV4(v float64) DVec4 + func (v DVec4) Add(o DVec4) DVec4 + func (v DVec4) AlmostEqual(o DVec4, tolerance float64) bool + func (v DVec4) Div(o DVec4) DVec4 + func (v DVec4) Dot(o DVec4) float64 + func (v DVec4) IsFinite() bool + func (v DVec4) IsInf() bool + func (v DVec4) IsNaN() bool + func (v DVec4) Magnitude() float64 + func (v DVec4) MagnitudeSquared() float64 + func (v DVec4) Max(o DVec4) DVec4 + func (v DVec4) MaxComponent() float64 + func (v DVec4) Min(o DVec4) DVec4 + func (v DVec4) MinComponent() float64 + func (v DVec4) Mul(o DVec4) DVec4 + func (v DVec4) Negated() DVec4 + func (v DVec4) Normalized() (DVec4, bool) + func (v DVec4) ProductComponents() float64 + func (v DVec4) Scale(s float64) DVec4 + func (v DVec4) Sub(o DVec4) DVec4 + func (v DVec4) SumComponents() float64 + func (v DVec4) SumSquaredComponents() float64 + func (v DVec4) Vec4() Vec4 + type Domain struct + Lower float64 + Upper float64 + func NewDomain(lower, upper float64) Domain + func (d Domain) Normalize(value float64) float64 + type Euler struct + Pitch float32 + Roll float32 + Yaw float32 + func NewEuler(yaw, pitch, roll float32) Euler + func (e Euler) AlmostEqual(other Euler, tolerance float32) bool + type Geo struct + Latitude float64 + Longitude float64 + func NewGeo(latitude, longitude float64) Geo + func (v Geo) AlmostEqual(other Geo, tolerance float64) bool + type HDRColor struct + A float32 + B float32 + G float32 + R float32 + func NewHDRColor(r, g, b, a float32) HDRColor + func (c HDRColor) AlmostEqual(other HDRColor, tolerance float32) bool + type Horizontal struct + Azimuth float64 + Inclination float64 + func HorizontalFromDVec2(v DVec2) Horizontal + func HorizontalFromVec2(v Vec2) Horizontal + func NewHorizontal(azimuth, inclination float64) Horizontal + func (v Horizontal) AlmostEqual(other Horizontal, tolerance float64) bool + func (v Horizontal) DVec2() DVec2 + func (v Horizontal) Vec2() Vec2 + type IVec2 struct + X int32 + Y int32 + func IV2(x, y int32) IVec2 + func SplatIV2(value int32) IVec2 + func (v IVec2) Vec2() Vec2 + type IVec3 struct + X int32 + Y int32 + Z int32 + func IV3(x, y, z int32) IVec3 + func SplatIV3(value int32) IVec3 + func (v IVec3) Vec3() Vec3 + type IVec4 struct + W int32 + X int32 + Y int32 + Z int32 + func IV4(x, y, z, w int32) IVec4 + func SplatIV4(value int32) IVec4 + type Interval struct + Max float32 + Min float32 + func EmptyInterval() Interval + func NewInterval(minimum, maximum float32) Interval + func (i Interval) AlmostEqual(other Interval, tolerance float32) bool + func (i Interval) Center() float32 + func (i Interval) Empty() bool + func (i Interval) Expanded(value float32) Interval + func (i Interval) Extent() float32 + func (i Interval) Intersection(other Interval) (Interval, bool) + func (i Interval) Merge(other Interval) Interval + func (i Interval) Valid() bool + type LogPolar struct + Azimuth float64 + Rho float64 + func NewLogPolar(rho, azimuth float64) LogPolar + func (v LogPolar) AlmostEqual(other LogPolar, tolerance float64) bool + type Mat4 struct + M11 float32 + M12 float32 + M13 float32 + M14 float32 + M21 float32 + M22 float32 + M23 float32 + M24 float32 + M31 float32 + M32 float32 + M33 float32 + M34 float32 + M41 float32 + M42 float32 + M43 float32 + M44 float32 + func BillboardMat4(objectPosition, cameraPosition, cameraUp, cameraForward Vec3) (Mat4, bool) + func ComposeMat4(scale Vec3, rotation Quat, translation Vec3) Mat4 + func ConstrainedBillboardMat4(objectPosition, cameraPosition, rotateAxis, cameraForward, objectForward Vec3) (Mat4, bool) + func IdentityMat4() Mat4 + func LookAtMat4(position, target, up Vec3) (Mat4, bool) + func Mat4FromAxisAngle(axis Vec3, angle float32) Mat4 + func Mat4FromQuat(q Quat) Mat4 + func Mat4FromRows(row0, row1, row2, row3 Vec4) Mat4 + func Mat4FromYawPitchRoll(yaw, pitch, roll float32) Mat4 + func NewMat4(m11, m12, m13, m14 float32, m21, m22, m23, m24 float32, ...) Mat4 + func OrthographicMat4(width, height, near, far float32) Mat4 + func OrthographicOffCenterMat4(left, right, bottom, top, near, far float32) Mat4 + func PerspectiveFOVMat4(fieldOfView, aspect, near, far float32) (Mat4, bool) + func PerspectiveMat4(width, height, near, far float32) (Mat4, bool) + func PerspectiveOffCenterMat4(left, right, bottom, top, near, far float32) (Mat4, bool) + func ReflectionMat4(plane Plane) (Mat4, bool) + func RotationAroundMat4(rotation Mat4, center Vec3) Mat4 + func RotationXMat4(angle float32) Mat4 + func RotationYMat4(angle float32) Mat4 + func RotationZMat4(angle float32) Mat4 + func ScaleAroundMat4(v, center Vec3) Mat4 + func ScaleMat4(v Vec3) Mat4 + func ShadowMat4(lightDirection Vec3, plane Plane) (Mat4, bool) + func TranslationMat4(v Vec3) Mat4 + func WorldMat4(position, forward, up Vec3) (Mat4, bool) + func (m Mat4) Add(o Mat4) Mat4 + func (m Mat4) AlmostEqual(other Mat4, tolerance float32) bool + func (m Mat4) At(row, column int) float32 + func (m Mat4) Column(column int) Vec4 + func (m Mat4) Decompose() (scale Vec3, rotation Quat, translation Vec3, ok bool) + func (m Mat4) Determinant() float32 + func (m Mat4) Inverse() (Mat4, bool) + func (m Mat4) IsIdentity() bool + func (m Mat4) IsReflection() bool + func (m Mat4) Lerp(o Mat4, amount float32) Mat4 + func (m Mat4) Mul(o Mat4) Mat4 + func (m Mat4) Quat() Quat + func (m Mat4) RayFromNormalizedScreen(screen Vec2) (Ray, bool) + func (m Mat4) RotationDeterminant() float32 + func (m Mat4) Row(row int) Vec4 + func (m Mat4) Scale(s float32) Mat4 + func (m Mat4) Sub(o Mat4) Mat4 + func (m Mat4) TransformDirection(v Vec3) Vec3 + func (m Mat4) TransformNormal(normal Vec3) (Vec3, bool) + func (m Mat4) TransformPoint(v Vec3) Vec3 + func (m Mat4) TransformVec4(v Vec4) Vec4 + func (m Mat4) Translation() Vec3 + func (m Mat4) Transposed() Mat4 + func (m Mat4) WithTranslation(translation Vec3) Mat4 + type Plane struct + D float32 + Normal Vec3 + func NewPlane(normal Vec3, d float32) Plane + func PlaneFromNormalPoint(normal, point Vec3) (Plane, bool) + func PlaneFromPoints(a, b, c Vec3) (Plane, bool) + func PlaneFromVec4(value Vec4) Plane + func XYPlane() Plane + func XZPlane() Plane + func YZPlane() Plane + func (p Plane) AlmostEqual(other Plane, tolerance float32) bool + func (p Plane) ClassifyPoint(point Vec3) float32 + func (p Plane) Dot(value Vec4) float32 + func (p Plane) DotCoordinate(point Vec3) float32 + func (p Plane) DotNormal(direction Vec3) float32 + func (p Plane) Normalized() (Plane, bool) + func (p Plane) Project(point Vec3) (Vec3, bool) + func (p Plane) Rotated(rotation Quat) Plane + func (p Plane) Transformed(matrix Mat4) (Plane, bool) + func (p Plane) Vec4() Vec4 + type PlaneIntersection uint8 + const PlaneIntersectionBack + const PlaneIntersectionFront + const PlaneIntersectionIntersecting + type Polar struct + Azimuth float64 + Radius float64 + func NewPolar(radius, azimuth float64) Polar + func (v Polar) AlmostEqual(other Polar, tolerance float64) bool + type Quad2 struct + A Vec2 + B Vec2 + C Vec2 + D Vec2 + func NewQuad2(a, b, c, d Vec2) Quad2 + func (q Quad2) AlmostEqual(other Quad2, tolerance float32) bool + type Quad3 struct + A Vec3 + B Vec3 + C Vec3 + D Vec3 + func NewQuad3(a, b, c, d Vec3) Quad3 + func (q Quad3) AlmostEqual(other Quad3, tolerance float32) bool + func (q Quad3) Map(mapper func(Vec3) Vec3) Quad3 + func (q Quad3) Transformed(matrix Mat4) Quad3 + type Quat struct + W float32 + X float32 + Y float32 + Z float32 + func Concatenate(first, second Quat) Quat + func IdentityQuat() Quat + func LookAtQuat(position, target, up, localForward Vec3) (Quat, bool) + func NewQuat(x, y, z, w float32) Quat + func QuatFromAxisAngle(axis Vec3, angle float32) Quat + func QuatFromEulerAngles(angles Vec3) Quat + func QuatFromVector(vector Vec3, scalar float32) Quat + func QuatFromYawPitchRoll(yaw, pitch, roll float32) Quat + func QuatRotationX(angle float32) Quat + func QuatRotationY(angle float32) Quat + func QuatRotationZ(angle float32) Quat + func RotationBetween(from, to, oppositeAxis Vec3) (Quat, bool) + func (q Quat) Add(other Quat) Quat + func (q Quat) AlmostEqual(other Quat, tolerance float32) bool + func (q Quat) Conjugated() Quat + func (q Quat) DQuat() DQuat + func (q Quat) Div(other Quat) (Quat, bool) + func (q Quat) Dot(other Quat) float32 + func (q Quat) EulerAngles() Vec3 + func (q Quat) Inverse() (Quat, bool) + func (q Quat) Length() float64 + func (q Quat) LengthSquared() float32 + func (q Quat) Lerp(other Quat, amount float32) (Quat, bool) + func (q Quat) Mul(other Quat) Quat + func (q Quat) Negated() Quat + func (q Quat) Normalized() (Quat, bool) + func (q Quat) Rotate(v Vec3) Vec3 + func (q Quat) RotateToVec4(v Vec3) Vec4 + func (q Quat) RotateVec2(v Vec2) Vec2 + func (q Quat) RotateVec2ToVec4(v Vec2) Vec4 + func (q Quat) RotateVec4(v Vec4) Vec4 + func (q Quat) Scale(scalar float32) Quat + func (q Quat) Slerp(other Quat, amount float32) Quat + func (q Quat) Sub(other Quat) Quat + func (q Quat) Vector() Vec3 + type RGB struct + B byte + G byte + R byte + func NewRGB(r, g, b byte) RGB + type RGBA struct + A byte + B byte + G byte + R byte + func DarkBlue() RGBA + func DarkGreen() RGBA + func DarkRed() RGBA + func LightBlue() RGBA + func LightGreen() RGBA + func LightRed() RGBA + func NewRGBA(r, g, b, a byte) RGBA + type Ray struct + Direction Vec3 + Origin Vec3 + func NewRay(origin, direction Vec3) Ray + func (r Ray) AlmostEqual(other Ray, tolerance float32) bool + func (r Ray) IntersectBox(box Box3) (float32, bool) + func (r Ray) IntersectPlane(plane Plane, tolerance float32) (float32, bool) + func (r Ray) IntersectSphere(sphere Sphere) (float32, bool) + func (r Ray) IntersectTriangle(triangle Triangle3, tolerance float32) (float32, bool) + func (r Ray) PointAt(t float32) Vec3 + func (r Ray) Transformed(matrix Mat4) (Ray, bool) + type Segment2 struct + A Vec2 + B Vec2 + func NewSegment2(a, b Vec2) Segment2 + func (s Segment2) AlmostEqual(other Segment2, tolerance float32) bool + func (s Segment2) Bounds() Box2 + func (s Segment2) ContainsOnLine(point Vec2, tolerance float32) bool + func (s Segment2) Intersects(other Segment2, tolerance float32) bool + func (s Segment2) Vector() Vec2 + type Segment3 struct + A Vec3 + B Vec3 + func NewSegment3(a, b Vec3) Segment3 + func (s Segment3) AlmostEqual(other Segment3, tolerance float32) bool + func (s Segment3) Length() float64 + func (s Segment3) LengthSquared() float32 + func (s Segment3) Map(mapper func(Vec3) Vec3) Segment3 + func (s Segment3) Midpoint() Vec3 + func (s Segment3) PointAt(t float32) Vec3 + func (s Segment3) Ray() Ray + func (s Segment3) Reversed() Segment3 + func (s Segment3) Transformed(matrix Mat4) Segment3 + func (s Segment3) Vector() Vec3 + func (s Segment3) WithLength(length float32) (Segment3, bool) + type Sphere struct + Center Vec3 + Radius float32 + func NewSphere(center Vec3, radius float32) Sphere + func (s Sphere) AlmostEqual(other Sphere, tolerance float32) bool + func (s Sphere) Bounds() Box3 + func (s Sphere) ContainsBox(box Box3) Containment + func (s Sphere) ContainsPoint(point Vec3) Containment + func (s Sphere) ContainsSphere(other Sphere) Containment + func (s Sphere) DistanceToPoint(point Vec3) float32 + func (s Sphere) DistanceToSphere(other Sphere) float32 + func (s Sphere) Intersects(other Sphere) bool + func (s Sphere) IntersectsBox(box Box3) bool + func (s Sphere) IntersectsPlane(plane Plane) PlaneIntersection + func (s Sphere) Merge(other Sphere) (Sphere, bool) + func (s Sphere) Transformed(matrix Mat4) (Sphere, bool) + func (s Sphere) Translated(offset Vec3) Sphere + func (s Sphere) Valid() bool + type Spherical struct + Azimuth float64 + Inclination float64 + Radius float64 + func NewSpherical(radius, azimuth, inclination float64) Spherical + func (v Spherical) AlmostEqual(other Spherical, tolerance float64) bool + type Stats struct + Count int + Max T + Min T + Sum T + func NewStats[T any](count int, minimum, maximum, sum T) Stats[T] + func StatsOf[T statsVector](values []T) Stats[T] + type Transform struct + Orientation Quat + Position Vec3 + func IdentityTransform() Transform + func NewTransform(position Vec3, orientation Quat) Transform + func (t Transform) AlmostEqual(other Transform, tolerance float32) bool + func (t Transform) Mat4() Mat4 + func (t Transform) TransformDirection(direction Vec3) Vec3 + func (t Transform) TransformPoint(point Vec3) Vec3 + type Triangle2 struct + A Vec2 + B Vec2 + C Vec2 + func NewTriangle2(a, b, c Vec2) Triangle2 + func (t Triangle2) AlmostEqual(other Triangle2, tolerance float32) bool + func (t Triangle2) Area() float32 + func (t Triangle2) Contains(point Vec2) bool + func (t Triangle2) SignedArea() float32 + type Triangle3 struct + A Vec3 + B Vec3 + C Vec3 + func NewTriangle3(a, b, c Vec3) Triangle3 + func (t Triangle3) AlmostEqual(other Triangle3, tolerance float32) bool + func (t Triangle3) Area() float32 + func (t Triangle3) Bounds() Box3 + func (t Triangle3) Centroid() Vec3 + func (t Triangle3) Degenerate() bool + func (t Triangle3) Edges() [3]Segment3 + func (t Triangle3) IsSliver(tolerance float32) bool + func (t Triangle3) Map(mapper func(Vec3) Vec3) Triangle3 + func (t Triangle3) Normal() (Vec3, bool) + func (t Triangle3) NormalDirection() Vec3 + func (t Triangle3) Perimeter() float64 + func (t Triangle3) Transformed(matrix Mat4) Triangle3 + type Vec2 struct + X float32 + Y float32 + func RandomVec2(index, seed int32) Vec2 + func SplatV2(value float32) Vec2 + func V2(x, y float32) Vec2 + func (v Vec2) Add(other Vec2) Vec2 + func (v Vec2) AlmostEqual(other Vec2, tolerance float32) bool + func (v Vec2) Cross(other Vec2) float32 + func (v Vec2) DVec2() DVec2 + func (v Vec2) Div(other Vec2) Vec2 + func (v Vec2) Dot(other Vec2) float32 + func (v Vec2) IsFinite() bool + func (v Vec2) IsInf() bool + func (v Vec2) IsNaN() bool + func (v Vec2) Magnitude() float64 + func (v Vec2) MagnitudeSquared() float64 + func (v Vec2) Max(other Vec2) Vec2 + func (v Vec2) MaxComponent() float32 + func (v Vec2) Min(other Vec2) Vec2 + func (v Vec2) MinComponent() float32 + func (v Vec2) Mul(other Vec2) Vec2 + func (v Vec2) Negated() Vec2 + func (v Vec2) Normalized() (Vec2, bool) + func (v Vec2) ProductComponents() float32 + func (v Vec2) Reflect(normal Vec2) (Vec2, bool) + func (v Vec2) Scale(scalar float32) Vec2 + func (v Vec2) Sub(other Vec2) Vec2 + func (v Vec2) SumComponents() float32 + func (v Vec2) SumSquaredComponents() float32 + func (v Vec2) Vec3() Vec3 + func (v Vec2) Vec4() Vec4 + type Vec3 struct + X float32 + Y float32 + Z float32 + func RandomVec3(index, seed int32) Vec3 + func SplatV3(value float32) Vec3 + func V3(x, y, z float32) Vec3 + func (v Vec3) Add(other Vec3) Vec3 + func (v Vec3) AlmostEqual(other Vec3, tolerance float32) bool + func (v Vec3) Angle(other Vec3) (float32, bool) + func (v Vec3) CatmullRom(value2, value3, value4 Vec3, amount float32) Vec3 + func (v Vec3) Cross(other Vec3) Vec3 + func (v Vec3) DVec3() DVec3 + func (v Vec3) Div(other Vec3) Vec3 + func (v Vec3) Dot(other Vec3) float32 + func (v Vec3) Hermite(tangent1, value2, tangent2 Vec3, amount float32) Vec3 + func (v Vec3) IsBackFace(lineOfSight Vec3) bool + func (v Vec3) IsCollinear(other Vec3, tolerance float32) bool + func (v Vec3) IsFinite() bool + func (v Vec3) IsInf() bool + func (v Vec3) IsNaN() bool + func (v Vec3) IsPerpendicular(other Vec3, tolerance float32) bool + func (v Vec3) Magnitude() float64 + func (v Vec3) MagnitudeSquared() float64 + func (v Vec3) Max(other Vec3) Vec3 + func (v Vec3) MaxComponent() float32 + func (v Vec3) Min(other Vec3) Vec3 + func (v Vec3) MinComponent() float32 + func (v Vec3) Mul(other Vec3) Vec3 + func (v Vec3) Negated() Vec3 + func (v Vec3) Normalized() (Vec3, bool) + func (v Vec3) ProductComponents() float32 + func (v Vec3) Projection(other Vec3) (Vec3, bool) + func (v Vec3) Reflect(normal Vec3) (Vec3, bool) + func (v Vec3) Rejection(other Vec3) (Vec3, bool) + func (v Vec3) Scale(scalar float32) Vec3 + func (v Vec3) SignedAngle(other, axis Vec3) (float32, bool) + func (v Vec3) SmoothStep(value2 Vec3, amount float32) Vec3 + func (v Vec3) Sub(other Vec3) Vec3 + func (v Vec3) SumComponents() float32 + func (v Vec3) SumSquaredComponents() float32 + func (v Vec3) Vec4() Vec4 + func (v Vec3) XY() Vec2 + func (v Vec3) XZ() Vec2 + func (v Vec3) XZY() Vec3 + func (v Vec3) YXZ() Vec3 + func (v Vec3) YZ() Vec2 + func (v Vec3) YZX() Vec3 + func (v Vec3) ZXY() Vec3 + func (v Vec3) ZYX() Vec3 + type Vec4 struct + W float32 + X float32 + Y float32 + Z float32 + func RandomVec4(index, seed int32) Vec4 + func SplatV4(value float32) Vec4 + func V4(x, y, z, w float32) Vec4 + func (v Vec4) Add(o Vec4) Vec4 + func (v Vec4) AlmostEqual(o Vec4, tolerance float32) bool + func (v Vec4) DVec4() DVec4 + func (v Vec4) Div(o Vec4) Vec4 + func (v Vec4) Dot(o Vec4) float32 + func (v Vec4) IsFinite() bool + func (v Vec4) IsInf() bool + func (v Vec4) IsNaN() bool + func (v Vec4) Magnitude() float64 + func (v Vec4) MagnitudeSquared() float64 + func (v Vec4) Max(o Vec4) Vec4 + func (v Vec4) MaxComponent() float32 + func (v Vec4) Min(o Vec4) Vec4 + func (v Vec4) MinComponent() float32 + func (v Vec4) Mul(o Vec4) Vec4 + func (v Vec4) Negated() Vec4 + func (v Vec4) Normalized() (Vec4, bool) + func (v Vec4) ProductComponents() float32 + func (v Vec4) Scale(s float32) Vec4 + func (v Vec4) Sub(o Vec4) Vec4 + func (v Vec4) SumComponents() float32 + func (v Vec4) SumSquaredComponents() float32 + func (v Vec4) Vec2() Vec2 + func (v Vec4) Vec3() Vec3