ngeom-macros 0.1.0

Internal proc-macro crate for ngeom
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 102.97 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 526.33 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • ervanalb/ngeom
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ervanalb

ngeom

ngeom is a library for doing geometry in N dimensions.

ngeom ships with modules for rigid Euclidean 2D and 3D geometry. The built-in modules provide primitives for points, lines, and planes, along with rigid transformations (rotations, translations, and reflections.)

If you prefer to own your geometric primitives, or if you desire a space with different dimensionality, metric, handedness, etc. then you can use the provided macro to generate all the necessary geometric operations on your own structs.

ngeom uses homogeneous coordinates to express ideal/infinite points, ideal/infinite lines, etc. and to provide for exception-free meet & join operations.

ngeom is generic over the [scalar] datatype, and can be used with f32, f64, or custom datatypes. It can even use integers, with some restrictions-- most functionality requires only scalar addition and multiplication.

With some effort, usage code can be written to be generic over the dimensionality or even the metric of the space.

ngeom does not use SIMD intrinsics, but rather emits compact expressions and structs that are easy for the compiler to optimize into SIMD instructions in an architecture-independent way.

ngeom is dependency-free. ngeom is no_std-compatible, with most functionality available, and the option to implement the rest.

Under the hood, ngeom is able to make these generalizations by using geometric algebra. Understanding geometric algebra is helpful but optional, as the functions are named for their geometric interpretation. Lower-level functions named after their geometric algebra expressions are available if needed.