Skip to content

Core.Math (Visera.Core.Math)

Core.Math provides math and geometry for the engine: linear algebra (vector, matrix, quaternion), arithmetic and intervals, geometry (area, AABB, point, rotation), color (common and linear), constants, hash (CityHash, GoldenRatio), random (RNG, PCG, Seed), trigonometry (degree and radian), bit ops, interpolation, and convolution kernels (e.g. Gaussian). All types and functions are under Visera; used with Types, Image, etc.

Responsibilities

  • Algebra: Vectors (2/3/4D etc.), matrix, quaternion for transform, camera, physics.
  • Geometry: Area, AABB, point, rotation representation and conversion.
  • Color: sRGB and linear color, common formats for rendering and Image.Pixel.
  • Random and hash: PCG RNG, seed type, CityHash/GoldenRatio hash for randomization and hash tables.
  • Other: Math constants, trigonometry (degree/radian types), bit ops, interpolation (lerp, smoothstep, etc.), Gaussian kernel.

Submodules

Module Description
Algebra Vector, Matrix, Quaternion.
Arithmetic Arithmetic, Interval, Operation.
Geometry Area, Box, Point, Rotation.
Color Common, Linear.
Hash CityHash, GoldenRatio.
Random RNG, Seed, PCG.
Trigonometry Degree, Radian.
Bit, Constants, Interpolation, Kernel Bit ops, constants, interpolation, convolution kernel.

See also

  • Core — Parent module
  • Image — Image and pixel use color and vector
  • Runtime.Graphics — Rendering uses matrix and quaternion