#gamedev #float #operations #simultaneously #perform #math #four

nightly floatx4

A library that can perform 4 float operations simultaneously

3 stable releases

1.1.0 Jul 31, 2024
1.0.1 Jul 31, 2024

#496 in Game dev

Download history 237/week @ 2024-07-26 58/week @ 2024-08-02

166 downloads per month

Apache-2.0

9KB
240 lines

floatx4-rs

A library that can perform 4 float operations simultaneously

Examples

use floatx4::Floatx4;

// let array = Floatx4::from_scalar(2.);
let array = Floatx4::from_array([1.,2.,3.,4.]);

// +,-,*,/ ...
let mut new_array = array * array ;
new_array+=array;

// print
for value in new_array{
    println!("{value:?}");
}

lib.rs:

Used to express the combination of four float numbers.

Examples

use floatx4::Floatx4;

// let array = Floatx4::from_scalar(2.);
let array = Floatx4::from_array([1.,2.,3.,4.]);

// +,-,*,/ ...
let mut new_array = array * array ;
new_array+=array;

// print
for value in new_array{
    println!("{value:?}");
}

Dependencies

~7KB