2 releases

0.2.2 Aug 7, 2024
0.2.1 Jul 17, 2024
0.2.0 Jul 16, 2024
0.1.0 Jul 10, 2024

#322 in Hardware support

Download history 84/week @ 2024-07-04 200/week @ 2024-07-11 84/week @ 2024-07-18 21/week @ 2024-07-25 87/week @ 2024-08-01 42/week @ 2024-08-08 3/week @ 2024-08-15

137 downloads per month

MIT license

610KB
17K SLoC

Game Math for Me

A math library for video games that allow independent management of data. Just like DirectXMath, data and vectors are divided.

Examples

use gmm::Float4;
 
let a = Float4::new(1.0, 2.0, 3.0, 4.0);
let s = Float4::fill(5.0);
let res = a + s;
 
println!("{} + {} = {}", a, s, res);

or

use gmm::Float4;
use gmm::Vector;
 
let a = Float4::new(1.0, 2.0, 3.0, 4.0);
let s = Float4::fill(5.0);
 
let v_a: Vector = a.into();
let v_s: Vector = s.into();
let v_res = v_a + v_s;
 
let res: Float4 = v_res.into();
 
println!("{} + {} = {}", a, s, res);

Features

Supports SIMD operations

The gmm library supports SIMD instructions on the x86, x86_64 and the aarch64 architecture.

Compile Features

  • bytemuck - Enables the bytemuck library implementation.
  • serde - Enables the serde library implementation.
  • mint - Enables the mint library implementation.
  • scalar-math - Disable the simd instruction in the library.
  • use-assertion - Allow panic calls within a function.

License

MIT license (LICENSE or http://opensource.org/licenses/MIT)

Dependencies

~205KB