2024-08-23 22:42:48 +00:00
|
|
|
pub struct Vector2<T> {
|
2024-08-28 17:47:30 +00:00
|
|
|
pub x: T,
|
|
|
|
pub y: T,
|
2024-08-23 22:42:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Vector3<T> {
|
2024-08-28 17:47:30 +00:00
|
|
|
pub x: T,
|
|
|
|
pub y: T,
|
|
|
|
pub z: T,
|
2024-08-23 22:42:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Vector4<T> {
|
2024-08-28 17:47:30 +00:00
|
|
|
pub x: T,
|
|
|
|
pub y: T,
|
|
|
|
pub z: T,
|
|
|
|
pub w: T,
|
2024-08-23 22:42:48 +00:00
|
|
|
}
|
|
|
|
|
2024-09-05 19:49:20 +00:00
|
|
|
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);
|
2024-09-04 20:38:29 +00:00
|
|
|
|
|
|
|
//cross product
|
|
|
|
crate::impl_vector_3!();
|