use crate::math::Vector;
use crate::utils::SimdRealCopy;
use na::{Vector2, Vector3};
pub trait ComponentMul: Sized {
fn component_mul(&self, other: &Self) -> Self;
}
impl ComponentMul for Vector {
#[inline]
fn component_mul(&self, other: &Self) -> Self {
*self * *other
}
}
impl<N: SimdRealCopy> ComponentMul for Vector2<N> {
#[inline]
fn component_mul(&self, other: &Self) -> Self {
nalgebra::Vector2::component_mul(self, other)
}
}
impl<N: SimdRealCopy> ComponentMul for Vector3<N> {
#[inline]
fn component_mul(&self, other: &Self) -> Self {
nalgebra::Vector3::component_mul(self, other)
}
}