#[cfg(feature = "zerocopy")]
use ::zerocopy::*;
use crate::{
scalar::{Scalard, Scalarf},
tuple::Tuple,
};
pub type Vec2<T> = Vector<T, 2>;
pub type Vec3<T> = Vector<T, 3>;
pub type Vec4<T> = Vector<T, 4>;
pub type Vec2f = Vec2<Scalarf>;
pub type Vec3f = Vec3<Scalarf>;
pub type Vec4f = Vec4<Scalarf>;
pub type Vec2d = Vec2<Scalard>;
pub type Vec3d = Vec3<Scalard>;
pub type Vec4d = Vec4<Scalard>;
#[derive(Debug, Clone, Copy, PartialEq)]
#[cfg_attr(feature = "sakka", derive(sakka::Encode, sakka::Decode))]
#[cfg_attr(feature = "zerocopy", derive(FromBytes, Immutable, IntoBytes, KnownLayout))]
#[repr(transparent)]
pub struct Vector<T, const N: usize> {
pub(crate) data: Tuple<T, N>,
}
#[doc(hidden)]
#[repr(C)]
pub struct Vector2Fields<T> {
pub x: T,
pub y: T,
}
#[doc(hidden)]
#[repr(C)]
pub struct Vector3Fields<T> {
pub x: T,
pub y: T,
pub z: T,
}
#[doc(hidden)]
#[repr(C)]
pub struct Vector4Fields<T> {
pub x: T,
pub y: T,
pub z: T,
pub w: T,
}