Upgrade to nalgebra 0.21
This commit is contained in:
parent
ec1ee394a9
commit
8bc2c4b229
|
|
@ -12,9 +12,10 @@ quickcheck = "0.9"
|
|||
quickcheck_macros = "0.8"
|
||||
rayon = "1.3"
|
||||
sdl2 = "0.32"
|
||||
simba = "0.1.2"
|
||||
|
||||
[dependencies.nalgebra]
|
||||
version = "0.19"
|
||||
version = "0.21"
|
||||
features = ["arbitrary"]
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ impl<T: Real> Plane<T> {
|
|||
distance_from_origin: T,
|
||||
material: Arc<dyn Material<T>>,
|
||||
) -> Plane<T> {
|
||||
normal.normalize();
|
||||
let normal = normal.normalize();
|
||||
let mut axis_closest_to_tangent = Vector3::zeros();
|
||||
axis_closest_to_tangent[normal.iamin()] = T::one();
|
||||
let cotangent = normal.cross(&axis_closest_to_tangent).normalize();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
use simba::scalar::{SubsetOf,SupersetOf};
|
||||
use nalgebra::RealField;
|
||||
|
||||
pub trait NormalizedToU32 {
|
||||
fn normalized_to_u32(self, num_bits: usize) -> u32;
|
||||
}
|
||||
|
||||
pub trait Real: RealField + NormalizedToU32 {}
|
||||
pub trait Real: RealField + SupersetOf<f32> + SubsetOf<f32> + NormalizedToU32 {}
|
||||
|
||||
impl NormalizedToU32 for f32 {
|
||||
fn normalized_to_u32(self, num_bits: usize) -> u32 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue