Skip to content

SiegeEngine/mathwrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mathwrap

MIT licensed

mathwrap is a math library with a focus on compatibility.

This is a work in progress, and is not ready for general use.

For unknown reasons, neither the author of cgmath nor the author of nalgebra implemented compatibility (From/Into) with the other library. This creates friction for downstream projects which must work with multiple non-math libraries which depend on different math libraries.

This crate wraps types from cgmath and nalgebra. In a few cases an entirely new type is created. In all cases where it is possible From and/or Into are implemented allowing direct conversion between types from different math libraries. Wherever possible, this conversion compiles away and has zero runtime cost (but this is not always possible).

We attempt to eventually provide a superset of the features. Additional features not present in the aforementioned crates are implemented, as were required to support the Siege Engine and in replacing siege-math.

To convert foreign types into our types, use either the From or Into trait. To convert back to the foreign type you must use the Into trait due to coherence rule limitations in the Rust language.

About

A Math Library with a focus on Compatibility

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages