forked from StrafesNET/strafe-project
25 lines
396 B
Rust
25 lines
396 B
Rust
pub struct Vector2<T> {
|
|
pub x: T,
|
|
pub y: T,
|
|
}
|
|
|
|
pub struct Vector3<T> {
|
|
pub x: T,
|
|
pub y: T,
|
|
pub z: T,
|
|
}
|
|
|
|
pub struct Vector4<T> {
|
|
pub x: T,
|
|
pub y: T,
|
|
pub z: T,
|
|
pub w: T,
|
|
}
|
|
|
|
crate::impl_vector_named_fields!(Vector2 { x, y }, 2);
|
|
crate::impl_vector_named_fields!(Vector3 { x, y, z }, 3);
|
|
crate::impl_vector_named_fields!(Vector4 { x, y, z, w }, 4);
|
|
|
|
//cross product
|
|
crate::impl_vector_3!();
|