1 2 3 4 5 6 7 8 9 10 11 12
use std::ops::Neg; use crate::vector::vec3::Vec3; impl Neg for Vec3 { type Output = Vec3; fn neg(self) -> Self::Output { let matrix = unsafe { -self.data.matrix }; Vec3::from(matrix) } }