Skip to content

gilzoide/bettercmath

Repository files navigation

bettercmath

A -betterC compatible 3D math library for D.

It is available as a DUB package, has online documentation and may be used directly as a Meson subproject or wrap.

Submodules

  • box: Type and dimension generic Axis-Aligned Bounding Boxes
  • cmath: Standard math type generic functions and constants, using D runtime (std.math) on CTFE and C runtime (core.stdc.math) otherwise
  • easings: Type generic easing functions based on https://easings.net
  • hexagrid2d: 2D Hexagon grid math based on https://www.redblobgames.com/grids/hexagons
  • matrix: Type and dimension generic Matrix type for use in linear algebra
  • misc: Miscelaneous math functions (angle measure transformation, type generic linear interpolation)
  • transform: Type and dimension generic Affine Transformations backed by possibly compacted Matrices
  • valuerange: Inclusive scalar value ranges for interpolating and remapping between ranges
  • vector: Type and dimension generic Vector type for use in linear algebra

TODO

  • Support row-major matrices
  • Color submodule
  • Gradient submodule