GGMath is a generic-graphics-math crate.
So types like Vector and Matrix are generic over T: Scalar.
You can implement Scalar for your custom types,
and when you do so you can override the implementations of vector functions for your custom scalar
to make optimizations only possible with your type.
These custom function implementations can have bugs, so this crate helps you test them.
Usage
- Make sure that in your Cargo.toml, you configure:
[]
= "unwind"
= "unwind"
- Create a custom scalar type
- Implement
TestableScalarfor your type. Requires you to provide 16 values which will be used for testing. println!("{}", test_scalar::<MyScalar>().fmt_test_result())
use ;
use ;
// Custom Type
;
// Implement Scalar for MyScalar
scalar_inner_vectors!;
// Implement TestableScalar for MyScalar