Enum naga::MathFunction
source · pub enum MathFunction {
Show 70 variants
Abs,
Min,
Max,
Clamp,
Saturate,
Cos,
Cosh,
Sin,
Sinh,
Tan,
Tanh,
Acos,
Asin,
Atan,
Atan2,
Asinh,
Acosh,
Atanh,
Radians,
Degrees,
Ceil,
Floor,
Round,
Fract,
Trunc,
Modf,
Frexp,
Ldexp,
Exp,
Exp2,
Log,
Log2,
Pow,
Dot,
Outer,
Cross,
Distance,
Length,
Normalize,
FaceForward,
Reflect,
Refract,
Sign,
Fma,
Mix,
Step,
SmoothStep,
Sqrt,
InverseSqrt,
Inverse,
Transpose,
Determinant,
CountTrailingZeros,
CountLeadingZeros,
CountOneBits,
ReverseBits,
ExtractBits,
InsertBits,
FindLsb,
FindMsb,
Pack4x8snorm,
Pack4x8unorm,
Pack2x16snorm,
Pack2x16unorm,
Pack2x16float,
Unpack4x8snorm,
Unpack4x8unorm,
Unpack2x16snorm,
Unpack2x16unorm,
Unpack2x16float,
}
Expand description
Built-in shader function for math.
Variants§
Abs
Min
Max
Clamp
Saturate
Cos
Cosh
Sin
Sinh
Tan
Tanh
Acos
Asin
Atan
Atan2
Asinh
Acosh
Atanh
Radians
Degrees
Ceil
Floor
Round
Fract
Trunc
Modf
Frexp
Ldexp
Exp
Exp2
Log
Log2
Pow
Dot
Outer
Cross
Distance
Length
Normalize
FaceForward
Reflect
Refract
Sign
Fma
Mix
Step
SmoothStep
Sqrt
InverseSqrt
Inverse
Transpose
Determinant
CountTrailingZeros
CountLeadingZeros
CountOneBits
ReverseBits
ExtractBits
InsertBits
FindLsb
FindMsb
Pack4x8snorm
Pack4x8unorm
Pack2x16snorm
Pack2x16unorm
Pack2x16float
Unpack4x8snorm
Unpack4x8unorm
Unpack2x16snorm
Unpack2x16unorm
Unpack2x16float
Implementations§
source§impl MathFunction
impl MathFunction
pub const fn argument_count(&self) -> usize
Trait Implementations§
source§impl Clone for MathFunction
impl Clone for MathFunction
source§fn clone(&self) -> MathFunction
fn clone(&self) -> MathFunction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MathFunction
impl Debug for MathFunction
source§impl Hash for MathFunction
impl Hash for MathFunction
source§impl Ord for MathFunction
impl Ord for MathFunction
source§fn cmp(&self, other: &MathFunction) -> Ordering
fn cmp(&self, other: &MathFunction) -> Ordering
1.21.0 · 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
source§impl PartialEq for MathFunction
impl PartialEq for MathFunction
source§fn eq(&self, other: &MathFunction) -> bool
fn eq(&self, other: &MathFunction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MathFunction
impl PartialOrd for MathFunction
source§fn partial_cmp(&self, other: &MathFunction) -> Option<Ordering>
fn partial_cmp(&self, other: &MathFunction) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for MathFunction
impl Eq for MathFunction
impl StructuralPartialEq for MathFunction
Auto Trait Implementations§
impl Freeze for MathFunction
impl RefUnwindSafe for MathFunction
impl Send for MathFunction
impl Sync for MathFunction
impl Unpin for MathFunction
impl UnwindSafe for MathFunction
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.