[−][src]Struct geng_core::prelude::Vec4
4-d vector.
Fields
x: Ty: Tz: Tw: TImplementations
impl<T> Vec4<T>[src]
pub fn xy(self) -> Vec2<T>[src]
pub fn xyz(self) -> Vec3<T>[src]
pub fn map<U, F>(self, f: F) -> Vec4<U> where
F: Fn(T) -> U, [src]
F: Fn(T) -> U,
impl<T> Vec4<T> where
T: Num + Copy, [src]
T: Num + Copy,
pub fn dot(a: Vec4<T>, b: Vec4<T>) -> T[src]
Calculate dot product of two vectors.
Examples
use batbox::*; assert_eq!(Vec4::dot(vec4(1, 2, 3, 4), vec4(3, 4, 5, 6)), 50);
Trait Implementations
impl<T> Add<Vec4<T>> for Vec4<T> where
T: Add<T, Output = T>, [src]
T: Add<T, Output = T>,
type Output = Vec4<T>
The resulting type after applying the + operator.
fn add(self, rhs: Vec4<T>) -> Vec4<T>[src]
impl<T> AddAssign<Vec4<T>> for Vec4<T> where
T: AddAssign<T>, [src]
T: AddAssign<T>,
fn add_assign(&mut self, rhs: Vec4<T>)[src]
impl<U> AsUniform for Vec4<U> where
[U; 4]: Uniform, [src]
[U; 4]: Uniform,
impl<T> Clone for Vec4<T> where
T: Clone, [src]
T: Clone,
impl<T> Copy for Vec4<T> where
T: Copy, [src]
T: Copy,
impl<T> Debug for Vec4<T> where
T: Debug, [src]
T: Debug,
impl<T> Deref for Vec4<T>[src]
impl<T> DerefMut for Vec4<T>[src]
impl<'de, T> Deserialize<'de> for Vec4<T> where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Vec4<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>, [src]
__deserializer: __D
) -> Result<Vec4<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<T> Display for Vec4<T> where
T: Display, [src]
T: Display,
impl<T> Div<T> for Vec4<T> where
T: Copy + Div<T, Output = T>, [src]
T: Copy + Div<T, Output = T>,
type Output = Vec4<T>
The resulting type after applying the / operator.
fn div(self, rhs: T) -> Vec4<T>[src]
impl<T> DivAssign<T> for Vec4<T> where
T: Copy + DivAssign<T>, [src]
T: Copy + DivAssign<T>,
fn div_assign(&mut self, rhs: T)[src]
impl<T> Eq for Vec4<T> where
T: Eq, [src]
T: Eq,
impl<T> From<[T; 4]> for Vec4<T>[src]
impl<T> Hash for Vec4<T> where
T: Hash, [src]
T: Hash,
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher, [src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<T> Mul<T> for Vec4<T> where
T: Copy + Mul<T, Output = T>, [src]
T: Copy + Mul<T, Output = T>,
type Output = Vec4<T>
The resulting type after applying the * operator.
fn mul(self, rhs: T) -> Vec4<T>[src]
impl<T> Mul<Vec4<T>> for Mat4<T> where
T: Num + Copy, [src]
T: Num + Copy,
type Output = Vec4<T>
The resulting type after applying the * operator.
fn mul(self, rhs: Vec4<T>) -> Vec4<T>[src]
impl Mul<Vec4<f32>> for f32[src]
type Output = Vec4<f32>
The resulting type after applying the * operator.
fn mul(self, rhs: Vec4<f32>) -> Vec4<f32>[src]
impl Mul<Vec4<f64>> for f64[src]
type Output = Vec4<f64>
The resulting type after applying the * operator.
fn mul(self, rhs: Vec4<f64>) -> Vec4<f64>[src]
impl Mul<Vec4<i16>> for i16[src]
type Output = Vec4<i16>
The resulting type after applying the * operator.
fn mul(self, rhs: Vec4<i16>) -> Vec4<i16>[src]
impl Mul<Vec4<i32>> for i32[src]
type Output = Vec4<i32>
The resulting type after applying the * operator.
fn mul(self, rhs: Vec4<i32>) -> Vec4<i32>[src]
impl Mul<Vec4<i64>> for i64[src]
type Output = Vec4<i64>
The resulting type after applying the * operator.
fn mul(self, rhs: Vec4<i64>) -> Vec4<i64>[src]
impl Mul<Vec4<i8>> for i8[src]
type Output = Vec4<i8>
The resulting type after applying the * operator.
fn mul(self, rhs: Vec4<i8>) -> Vec4<i8>[src]
impl Mul<Vec4<isize>> for isize[src]
type Output = Vec4<isize>
The resulting type after applying the * operator.
fn mul(self, rhs: Vec4<isize>) -> Vec4<isize>[src]
impl Mul<Vec4<u16>> for u16[src]
type Output = Vec4<u16>
The resulting type after applying the * operator.
fn mul(self, rhs: Vec4<u16>) -> Vec4<u16>[src]
impl Mul<Vec4<u32>> for u32[src]
type Output = Vec4<u32>
The resulting type after applying the * operator.
fn mul(self, rhs: Vec4<u32>) -> Vec4<u32>[src]
impl Mul<Vec4<u64>> for u64[src]
type Output = Vec4<u64>
The resulting type after applying the * operator.
fn mul(self, rhs: Vec4<u64>) -> Vec4<u64>[src]
impl Mul<Vec4<u8>> for u8[src]
type Output = Vec4<u8>
The resulting type after applying the * operator.
fn mul(self, rhs: Vec4<u8>) -> Vec4<u8>[src]
impl Mul<Vec4<usize>> for usize[src]
type Output = Vec4<usize>
The resulting type after applying the * operator.
fn mul(self, rhs: Vec4<usize>) -> Vec4<usize>[src]
impl<T> MulAssign<T> for Vec4<T> where
T: Copy + MulAssign<T>, [src]
T: Copy + MulAssign<T>,
fn mul_assign(&mut self, rhs: T)[src]
impl<T> Neg for Vec4<T> where
T: Neg<Output = T>, [src]
T: Neg<Output = T>,
impl<T> PartialEq<Vec4<T>> for Vec4<T> where
T: PartialEq<T>, [src]
T: PartialEq<T>,
impl<T> Schematic for Vec4<T> where
T: Schematic + 'static, [src]
T: Schematic + 'static,
fn create_schema() -> Schema[src]
impl<T> Serialize for Vec4<T> where
T: Serialize, [src]
T: Serialize,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer, [src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl<T> StructuralEq for Vec4<T>[src]
impl<T> StructuralPartialEq for Vec4<T>[src]
impl<T> Sub<Vec4<T>> for Vec4<T> where
T: Sub<T, Output = T>, [src]
T: Sub<T, Output = T>,
type Output = Vec4<T>
The resulting type after applying the - operator.
fn sub(self, rhs: Vec4<T>) -> Vec4<T>[src]
impl<T> SubAssign<Vec4<T>> for Vec4<T> where
T: SubAssign<T>, [src]
T: SubAssign<T>,
fn sub_assign(&mut self, rhs: Vec4<T>)[src]
impl<T> Trans for Vec4<T> where
T: Trans, [src]
T: Trans,
fn write_to(&self, writer: &mut dyn Write) -> Result<(), Error>[src]
fn read_from(reader: &mut dyn Read) -> Result<Vec4<T>, Error>[src]
impl VertexAttribute for Vec4<f32>[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Vec4<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Vec4<T> where
T: Send,
T: Send,
impl<T> Sync for Vec4<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Vec4<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Vec4<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> DynClone for T where
T: Clone, [src]
T: Clone,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Uniform for T where
T: AsUniform, [src]
T: AsUniform,
fn apply(&self, gl: &Context, info: &UniformInfo)[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,