mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-04 18:08:26 +00:00
Reduce reliance on nalgebra
This commit is contained in:
parent
7c17362693
commit
d84103ce6e
@ -1,5 +1,7 @@
|
||||
use std::{fmt, ops};
|
||||
|
||||
use iter_fixed::IntoIteratorFixed;
|
||||
|
||||
use crate::Bivector;
|
||||
|
||||
use super::{
|
||||
@ -323,7 +325,14 @@ where
|
||||
type Output = Self;
|
||||
|
||||
fn add(self, rhs: V) -> Self::Output {
|
||||
self.to_na().add(rhs.into().to_na()).into()
|
||||
let components = self
|
||||
.components
|
||||
.into_iter_fixed()
|
||||
.zip(rhs.into().components)
|
||||
.map(|(a, b)| a + b)
|
||||
.collect();
|
||||
|
||||
Self { components }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user