#[repr(C)]pub struct Matrix<T, const ROW: usize, const COL: usize> {
pub columns: Vector<Vector<T, ROW>, COL>,
}Expand description
ROW rows, COL columns.
Can be indexed matrix[row][col]
Fields§
§columns: Vector<Vector<T, ROW>, COL>Implementations§
Source§impl<T, const ROW: usize> Matrix<T, ROW, 1>
impl<T, const ROW: usize> Matrix<T, ROW, 1>
Sourcepub const fn from_vector(vector: Vector<T, ROW>) -> Matrix<T, ROW, 1>
pub const fn from_vector(vector: Vector<T, ROW>) -> Matrix<T, ROW, 1>
From a Mx1 vector
Source§impl<T, const ROW: usize, const COL: usize> Matrix<T, ROW, COL>
impl<T, const ROW: usize, const COL: usize> Matrix<T, ROW, COL>
Sourcepub fn from_fn<F>(column_then_row: F) -> Matrix<T, ROW, COL>
pub fn from_fn<F>(column_then_row: F) -> Matrix<T, ROW, COL>
Create a matrix from a fn((columns,row))
pub fn from_col_fn<F>(column_then_row: F) -> Matrix<T, ROW, COL>
pub fn from_row_fn<F>(row_then_column: F) -> Matrix<T, ROW, COL>
pub const fn from_col( columns: Vector<Vector<T, ROW>, COL>, ) -> Matrix<T, ROW, COL>
pub fn from_col_array(columns: [[T; ROW]; COL]) -> Matrix<T, ROW, COL>
pub fn from_row(rows: Vector<Vector<T, COL>, ROW>) -> Matrix<T, ROW, COL>where
T: Copy,
pub fn from_row_array(rows: [[T; COL]; ROW]) -> Matrix<T, ROW, COL>where
T: Copy,
pub fn col(&self) -> Vector<Vector<T, ROW>, COL>where
T: Copy,
pub fn row(&self) -> Vector<Vector<T, COL>, ROW>where
T: Copy,
pub fn iter_col(&self) -> impl Iterator<Item = Vector<T, ROW>>
pub fn iter_row(&self) -> impl Iterator<Item = Vector<T, COL>>
Sourcepub fn transpose(&self) -> Matrix<T, COL, ROW>where
T: Copy,
pub fn transpose(&self) -> Matrix<T, COL, ROW>where
T: Copy,
Transpose the matrix
use hexga_math::prelude::*;
assert_eq!(
Mat2::from_col(vector2(vec2(1., 2.), vec2(3., 4.))).transpose(),
Mat2::from_col(vector2(vec2(1., 3.), vec2(2., 4.)))
);
assert_eq!(
Mat::<3,2>::from_col(vector2(vec3(1., 2., 3.), vec3(4., 5., 6.))).transpose(),
Mat::<2,3>::from_col(vector3(vec2(1., 4.), vec2(2., 5.), vec2(3., 6.)))
);Source§impl<T> Matrix<T, 2, 2>
impl<T> Matrix<T, 2, 2>
pub fn transform_relative(self, relative: Vector<T, 1>) -> Vector<T, 1>where
T: Zero,
pub fn transform_position(self, position: Vector<T, 1>) -> Vector<T, 1>where
T: One,
Source§impl<T> Matrix<T, 3, 3>
impl<T> Matrix<T, 3, 3>
pub fn transform_relative(self, relative: Vector<T, 2>) -> Vector<T, 2>where
T: Zero,
pub fn transform_position(self, position: Vector<T, 2>) -> Vector<T, 2>where
T: One,
Source§impl<T> Matrix<T, 4, 4>
impl<T> Matrix<T, 4, 4>
pub fn transform_relative(self, relative: Vector<T, 3>) -> Vector<T, 3>where
T: Zero,
pub fn transform_position(self, position: Vector<T, 3>) -> Vector<T, 3>where
T: One,
Source§impl<T, const N: usize> Matrix<T, N, N>where
T: Float,
impl<T, const N: usize> Matrix<T, N, N>where
T: Float,
Sourcepub fn inverse(self) -> Option<Matrix<T, N, N>>
pub fn inverse(self) -> Option<Matrix<T, N, N>>
Inverse the matrix, or return None if the matrix is singular.
use hexga_math::prelude::*;
assert_eq!(Mat2::IDENTITY.inverse(), Some(Mat2::IDENTITY));
// Non inversible matrix
let mut m2 = Mat2::IDENTITY;
m2.set_y(vec2(0., 0.));
assert_eq!(m2.inverse(), None);
let m2 = Mat2::from_col(vector2(vec2(1., 3.), vec2(2., 4.)));
let m2_inv = m2.inverse().unwrap();
assert_eq!(m2 * m2_inv, Mat2::IDENTITY);Source§impl<T, const N: usize> Matrix<T, N, N>
the rotation code is mainly based on glam code
impl<T, const N: usize> Matrix<T, N, N>
the rotation code is mainly based on glam code
pub fn from_rotation_axis( axis: Vector<T, 3>, angle: AngleOf<T>, ) -> Matrix<T, N, N>
pub fn from_rotation_x(angle: AngleOf<T>) -> Matrix<T, N, N>
pub fn from_rotation_y(angle: AngleOf<T>) -> Matrix<T, N, N>
Source§impl<T, const N: usize> Matrix<T, N, N>
impl<T, const N: usize> Matrix<T, N, N>
pub fn from_rotation_z(angle: AngleOf<T>) -> Matrix<T, N, N>
Methods from Deref<Target = Vector<Vector<T, ROW>, COL>>§
pub fn have_x(&self) -> bool
pub fn have_y(&self) -> bool
pub fn have_z(&self) -> bool
pub fn have_w(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = &T>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut T>
pub fn normalize(&mut self) -> &mut Vector<T, N>
Sourcepub fn set_angle(&mut self, angle: AngleOf<T>) -> &mut Vector<T, N>
pub fn set_angle(&mut self, angle: AngleOf<T>) -> &mut Vector<T, N>
set the angle of the (x, y) axis
pub fn set_length(&mut self, length: T)
Trait Implementations§
Source§impl<T, const ROW: usize, const COL: usize> AddAssign for Matrix<T, ROW, COL>
impl<T, const ROW: usize, const COL: usize> AddAssign for Matrix<T, ROW, COL>
Source§fn add_assign(&mut self, rhs: Matrix<T, ROW, COL>)
fn add_assign(&mut self, rhs: Matrix<T, ROW, COL>)
Performs the
+= operation. Read moreimpl<T, const ROW: usize, const COL: usize> Copy for Matrix<T, ROW, COL>where
T: Copy,
Source§impl<'de, T, const ROW: usize, const COL: usize> Deserialize<'de> for Matrix<T, ROW, COL>where
T: Deserialize<'de>,
impl<'de, T, const ROW: usize, const COL: usize> Deserialize<'de> for Matrix<T, ROW, COL>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Matrix<T, ROW, COL>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Matrix<T, ROW, COL>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T, const ROW: usize, const COL: usize> DivAssign<T> for Matrix<T, ROW, COL>
impl<T, const ROW: usize, const COL: usize> DivAssign<T> for Matrix<T, ROW, COL>
Source§fn div_assign(&mut self, rhs: T)
fn div_assign(&mut self, rhs: T)
Performs the
/= operation. Read moreimpl<T, const ROW: usize, const COL: usize> Eq for Matrix<T, ROW, COL>where
T: Eq,
Source§impl<T, const ROW: usize, const COL: usize> IoLoad for Matrix<T, ROW, COL>where
T: IoLoad,
impl<T, const ROW: usize, const COL: usize> IoLoad for Matrix<T, ROW, COL>where
T: IoLoad,
Source§fn load_own_extensions() -> impl Iterator<Item = &'static str>
fn load_own_extensions() -> impl Iterator<Item = &'static str>
fn load_from_bytes_with_own_extension( data: &[u8], path: &str, extension: &str, ) -> Result<Self, IoError>
fn load_from_bytes_with_own_extension_pathless( data: &[u8], extension: &str, ) -> Result<Self, IoErrorKind>
const CAN_BE_LOADED_FROM_TEXT: bool = false
fn load_from_str_with_own_extension( data: &str, path: &str, extension: &str, ) -> Result<Self, IoError>
fn load_from_str_with_own_extension_pathless( data: &str, extension: &str, ) -> Result<Self, IoErrorKind>
Source§fn can_open_own_extension(extension: &str) -> bool
fn can_open_own_extension(extension: &str) -> bool
Don’t include the markup language extension like
json or ronSource§fn load_extensions() -> impl Iterator<Item = &'static str>
fn load_extensions() -> impl Iterator<Item = &'static str>
Also include the markup language extension like
json or ronSource§fn can_open_extension(extension: &str) -> bool
fn can_open_extension(extension: &str) -> bool
Also include the markup language extension like
json or ronfn load_from<Fs>(path: &str, fs: &mut Fs) -> Result<Self, IoError>where
Fs: IoFsRead,
fn load_from_with_extension<Fs>(
path: &str,
extension: &str,
fs: &mut Fs,
) -> Result<Self, IoError>where
Fs: IoFsRead,
Source§impl<T, const ROW: usize, const COL: usize> IoSave for Matrix<T, ROW, COL>where
T: IoSave,
impl<T, const ROW: usize, const COL: usize> IoSave for Matrix<T, ROW, COL>where
T: IoSave,
Source§fn save_own_extensions() -> impl Iterator<Item = &'static str>
fn save_own_extensions() -> impl Iterator<Item = &'static str>
fn save_to_with_own_extension<W, Fs>( &self, path: &str, extension: &str, w: W, fs: &mut Fs, ) -> Result<(), IoError>
fn save_to_with_own_extension_pathless<W, Fs>( &self, extension: &str, w: W, fs: &mut Fs, ) -> Result<(), IoErrorKind>
Source§fn save_default_extension() -> Option<&'static str>
fn save_default_extension() -> Option<&'static str>
When saving, if the extension is missing, the file will use this extension by default
Source§fn can_save_own_extension(extension: &str) -> bool
fn can_save_own_extension(extension: &str) -> bool
Don’t include the markup language extension like
json or ronSource§fn save_extensions() -> impl Iterator<Item = &'static str>
fn save_extensions() -> impl Iterator<Item = &'static str>
Also include the markup language extension like
json or ronSource§fn can_save_extension(extension: &str) -> bool
fn can_save_extension(extension: &str) -> bool
Also include the markup language extension like
json or ronfn save_to<Fs>(&self, path: &str, fs: &mut Fs) -> Result<(), IoError>where
Fs: IoFsWrite,
fn save_to_with_extension<Fs>(
&self,
path: &str,
extension: &str,
fs: &mut Fs,
) -> Result<(), IoError>where
Fs: IoFsWrite,
fn save_with_reader<W, Fs>( &self, path: &str, w: W, fs: &mut Fs, ) -> Result<(), IoError>
fn save_with_reader_and_extension<W, Fs>( &self, path: &str, extension: &str, w: W, fs: &mut Fs, ) -> Result<(), IoError>
Source§impl<T, const ROW: usize, const COL: usize> LowerExp for Matrix<T, ROW, COL>where
T: LowerExp,
impl<T, const ROW: usize, const COL: usize> LowerExp for Matrix<T, ROW, COL>where
T: LowerExp,
Source§impl<T, const ROW: usize, const COL: usize> LowerHex for Matrix<T, ROW, COL>where
T: LowerHex,
impl<T, const ROW: usize, const COL: usize> LowerHex for Matrix<T, ROW, COL>where
T: LowerHex,
Source§impl<T, const ROW: usize, const COL: usize, const COL2: usize> Mul<Matrix<T, COL, COL2>> for Matrix<T, ROW, COL>where
T: NumberArithmetic,
use hexga_math::prelude::*;
let m1 = Mat2P::from_col((point2(7, 6), point2(5, 3)).into());
let m2 = Mat2P::from_col((point2(2, 5), point2(1, 1)).into());
let m3 = Mat2P::from_col((point2(39, 27), point2(12, 9)).into());
assert_eq!(m1 * m2, m3);
let m1 = Matrix::<i32,2,3>::from_col(vector3(vector2(1, 4), vector2(2, 5), vector2(3, 6)));
let m2 = Matrix::<i32,3,2>::from_col(vector2(vector3(7, 9, 11), vector3(8, 10, 12)));
let m3 = Matrix::<i32,2,2>::from_col(vector2(vector2(1*7+2*9+3*11, 4*7+5*9+6*11), vector2(1*8+2*10+3*12, 4*8+5*10+6*12)));
assert_eq!(m1 * m2, m3);
impl<T, const ROW: usize, const COL: usize, const COL2: usize> Mul<Matrix<T, COL, COL2>> for Matrix<T, ROW, COL>where
T: NumberArithmetic,
use hexga_math::prelude::*;
let m1 = Mat2P::from_col((point2(7, 6), point2(5, 3)).into());
let m2 = Mat2P::from_col((point2(2, 5), point2(1, 1)).into());
let m3 = Mat2P::from_col((point2(39, 27), point2(12, 9)).into());
assert_eq!(m1 * m2, m3);
let m1 = Matrix::<i32,2,3>::from_col(vector3(vector2(1, 4), vector2(2, 5), vector2(3, 6)));
let m2 = Matrix::<i32,3,2>::from_col(vector2(vector3(7, 9, 11), vector3(8, 10, 12)));
let m3 = Matrix::<i32,2,2>::from_col(vector2(vector2(1*7+2*9+3*11, 4*7+5*9+6*11), vector2(1*8+2*10+3*12, 4*8+5*10+6*12)));
assert_eq!(m1 * m2, m3);Source§impl<T, const COL: usize> MulAssign for Matrix<T, COL, COL>
impl<T, const COL: usize> MulAssign for Matrix<T, COL, COL>
Source§fn mul_assign(&mut self, rhs: Matrix<T, COL, COL>)
fn mul_assign(&mut self, rhs: Matrix<T, COL, COL>)
Performs the
*= operation. Read moreSource§impl<T, const ROW: usize, const COL: usize> MulAssign<T> for Matrix<T, ROW, COL>
impl<T, const ROW: usize, const COL: usize> MulAssign<T> for Matrix<T, ROW, COL>
Source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the
*= operation. Read moreSource§impl<T, const ROW: usize, const COL: usize> Ord for Matrix<T, ROW, COL>where
T: Ord,
impl<T, const ROW: usize, const COL: usize> Ord for Matrix<T, ROW, COL>where
T: Ord,
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<T, const ROW: usize, const COL: usize> PartialEq for Matrix<T, ROW, COL>where
T: PartialEq,
impl<T, const ROW: usize, const COL: usize> PartialEq for Matrix<T, ROW, COL>where
T: PartialEq,
Source§impl<T, const ROW: usize, const COL: usize> PartialOrd for Matrix<T, ROW, COL>where
T: PartialOrd,
impl<T, const ROW: usize, const COL: usize> PartialOrd for Matrix<T, ROW, COL>where
T: PartialOrd,
Source§impl<T, const N: usize> Position<T, N> for Matrix<T, N, N>where
T: Copy,
impl<T, const N: usize> Position<T, N> for Matrix<T, N, N>where
T: Copy,
fn pos(&self) -> Vector<T, N>
fn set_pos(&mut self, pos: Vector<T, N>) -> &mut Matrix<T, N, N>
fn x(&self) -> T
fn y(&self) -> T
fn z(&self) -> T
fn w(&self) -> T
fn set_x(&mut self, x: T) -> &mut Self
fn set_y(&mut self, y: T) -> &mut Self
fn set_z(&mut self, z: T) -> &mut Self
fn set_w(&mut self, w: T) -> &mut Self
fn with_pos(self, pos: Vector<T, N>) -> Selfwhere
Self: Sized,
fn with_x(self, x: T) -> Self
fn with_y(self, y: T) -> Self
fn with_z(self, z: T) -> Self
fn with_w(self, w: T) -> Self
fn move_by(&mut self, v: impl Into<Vector<T, N>>) -> &mut Self
fn move_neg_by(&mut self, v: impl Into<Vector<T, N>>) -> &mut Self
fn move_x(&mut self, x: T) -> &mut Self
fn move_y(&mut self, y: T) -> &mut Self
fn move_z(&mut self, z: T) -> &mut Self
fn move_w(&mut self, w: T) -> &mut Self
fn move_neg_x(&mut self, x: T) -> &mut Self
fn move_neg_y(&mut self, y: T) -> &mut Self
fn move_neg_z(&mut self, z: T) -> &mut Self
fn move_neg_w(&mut self, w: T) -> &mut Self
fn moved_by(self, v: impl Into<Vector<T, N>>) -> Self
fn moved_neg_by(self, v: impl Into<Vector<T, N>>) -> Self
fn moved_x(self, x: T) -> Self
fn moved_y(self, y: T) -> Self
fn moved_z(self, z: T) -> Self
fn moved_w(self, w: T) -> Self
fn moved_neg_x(self, x: T) -> Self
fn moved_neg_y(self, y: T) -> Self
fn moved_neg_z(self, z: T) -> Self
fn moved_neg_w(self, w: T) -> Self
Source§impl<T, const N: usize> Position<Vector<T, N>, N> for Matrix<T, N, N>where
T: Copy,
impl<T, const N: usize> Position<Vector<T, N>, N> for Matrix<T, N, N>where
T: Copy,
fn pos(&self) -> Vector<Vector<T, N>, N>
fn set_pos(&mut self, pos: Vector<Vector<T, N>, N>) -> &mut Matrix<T, N, N>
fn x(&self) -> T
fn y(&self) -> T
fn z(&self) -> T
fn w(&self) -> T
fn set_x(&mut self, x: T) -> &mut Self
fn set_y(&mut self, y: T) -> &mut Self
fn set_z(&mut self, z: T) -> &mut Self
fn set_w(&mut self, w: T) -> &mut Self
fn with_pos(self, pos: Vector<T, N>) -> Selfwhere
Self: Sized,
fn with_x(self, x: T) -> Self
fn with_y(self, y: T) -> Self
fn with_z(self, z: T) -> Self
fn with_w(self, w: T) -> Self
fn move_by(&mut self, v: impl Into<Vector<T, N>>) -> &mut Self
fn move_neg_by(&mut self, v: impl Into<Vector<T, N>>) -> &mut Self
fn move_x(&mut self, x: T) -> &mut Self
fn move_y(&mut self, y: T) -> &mut Self
fn move_z(&mut self, z: T) -> &mut Self
fn move_w(&mut self, w: T) -> &mut Self
fn move_neg_x(&mut self, x: T) -> &mut Self
fn move_neg_y(&mut self, y: T) -> &mut Self
fn move_neg_z(&mut self, z: T) -> &mut Self
fn move_neg_w(&mut self, w: T) -> &mut Self
fn moved_by(self, v: impl Into<Vector<T, N>>) -> Self
fn moved_neg_by(self, v: impl Into<Vector<T, N>>) -> Self
fn moved_x(self, x: T) -> Self
fn moved_y(self, y: T) -> Self
fn moved_z(self, z: T) -> Self
fn moved_w(self, w: T) -> Self
fn moved_neg_x(self, x: T) -> Self
fn moved_neg_y(self, y: T) -> Self
fn moved_neg_z(self, z: T) -> Self
fn moved_neg_w(self, w: T) -> Self
Source§impl<T, const ROW: usize, const COL: usize> Serialize for Matrix<T, ROW, COL>where
T: Serialize,
impl<T, const ROW: usize, const COL: usize> Serialize for Matrix<T, ROW, COL>where
T: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T, const ROW: usize, const COL: usize> StructuralPartialEq for Matrix<T, ROW, COL>where
T: PartialEq,
Source§impl<T, const ROW: usize, const COL: usize> SubAssign for Matrix<T, ROW, COL>
impl<T, const ROW: usize, const COL: usize> SubAssign for Matrix<T, ROW, COL>
Source§fn sub_assign(&mut self, rhs: Matrix<T, ROW, COL>)
fn sub_assign(&mut self, rhs: Matrix<T, ROW, COL>)
Performs the
-= operation. Read moreSource§impl<T, const ROW: usize, const COL: usize> UpperExp for Matrix<T, ROW, COL>where
T: UpperExp,
impl<T, const ROW: usize, const COL: usize> UpperExp for Matrix<T, ROW, COL>where
T: UpperExp,
Source§impl<T, const ROW: usize, const COL: usize> UpperHex for Matrix<T, ROW, COL>where
T: UpperHex,
impl<T, const ROW: usize, const COL: usize> UpperHex for Matrix<T, ROW, COL>where
T: UpperHex,
Auto Trait Implementations§
impl<T, const ROW: usize, const COL: usize> Freeze for Matrix<T, ROW, COL>
impl<T, const ROW: usize, const COL: usize> RefUnwindSafe for Matrix<T, ROW, COL>
impl<T, const ROW: usize, const COL: usize> Send for Matrix<T, ROW, COL>
impl<T, const ROW: usize, const COL: usize> Sync for Matrix<T, ROW, COL>
impl<T, const ROW: usize, const COL: usize> Unpin for Matrix<T, ROW, COL>
impl<T, const ROW: usize, const COL: usize> UnsafeUnpin for Matrix<T, ROW, COL>
impl<T, const ROW: usize, const COL: usize> UnwindSafe for Matrix<T, ROW, COL>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Src, Dest> CastRangeFrom<Dest> for Srcwhere
Dest: CastRangeInto<Src>,
impl<Src, Dest> CastRangeFrom<Dest> for Srcwhere
Dest: CastRangeInto<Src>,
fn cast_range_from(value: Dest) -> Src
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Decrease for T
impl<T> Decrease for T
Source§fn can_decrease(&self) -> bool
fn can_decrease(&self) -> bool
Do the current value have a predecessor. Read more
Source§fn predecessor(self) -> Self
fn predecessor(self) -> Self
Return the predecessor
self - 1Source§fn predecessor_checked(&mut self) -> Result<Self, ()>
fn predecessor_checked(&mut self) -> Result<Self, ()>
Return the predecessor
self - 1Source§fn have_predecessor(self) -> bool
fn have_predecessor(self) -> bool
Do the current value have a predecessor. Read more
Source§impl<T> DefaultExtension for T
impl<T> DefaultExtension for T
fn is_default(&self) -> bool
fn is_not_default(&self) -> bool
Source§impl<T> DefaultIsTripleUnderscore for Twhere
T: Default,
impl<T> DefaultIsTripleUnderscore for Twhere
T: Default,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Increase for T
impl<T> Increase for T
Source§fn can_increase(&self) -> bool
fn can_increase(&self) -> bool
Do the current value have a successor. Read more
Source§fn successor_checked(&mut self) -> Result<Self, ()>
fn successor_checked(&mut self) -> Result<Self, ()>
Return the successor
self + 1Source§fn have_successor(self) -> bool
fn have_successor(self) -> bool
Do the current value have a successor. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LoadToDisk for T
impl<T> LoadToDisk for T
Source§impl<T> PartialOrdExtension for Twhere
T: PartialOrd,
impl<T> PartialOrdExtension for Twhere
T: PartialOrd,
fn max_partial(self, other: Self) -> Selfwhere
Self: Sized,
fn min_partial(self, other: Self) -> Selfwhere
Self: Sized,
fn clamp_partial(self, min: Self, max: Self) -> Selfwhere
Self: Sized,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PositiveOrNegative for Twhere
T: Zero + PartialOrd,
impl<T> PositiveOrNegative for Twhere
T: Zero + PartialOrd,
Source§fn is_positive_or_zero(&self) -> bool
fn is_positive_or_zero(&self) -> bool
Is >= 0 Read more
Source§fn is_negative_or_zero(&self) -> bool
fn is_negative_or_zero(&self) -> bool
Is <= 0 Read more
Source§fn is_strictly_positive(&self) -> bool
fn is_strictly_positive(&self) -> bool
Is > 0 Read more
Source§fn is_strictly_negative(&self) -> bool
fn is_strictly_negative(&self) -> bool
Is < 0 Read more