lyra-engine/lyra-ecs/src/math.rs

19 lines
407 B
Rust
Raw Normal View History

use crate::Component;
use glam::{Vec3, Quat, Vec2, Vec4, Mat4};
macro_rules! impl_component_math {
($type: ident) => {
impl Component for $type {
fn name() -> &'static str {
stringify!($type)
}
}
};
}
impl_component_math!(Vec2);
impl_component_math!(Vec3);
impl_component_math!(Vec4);
impl_component_math!(Mat4);
impl_component_math!(Quat);