pub enum MathFunction {
Show 79 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,
    Dot4I8Packed,
    Dot4U8Packed,
    Outer,
    Cross,
    Distance,
    Length,
    Normalize,
    FaceForward,
    Reflect,
    Refract,
    Sign,
    Fma,
    Mix,
    Step,
    SmoothStep,
    Sqrt,
    InverseSqrt,
    Inverse,
    Transpose,
    Determinant,
    QuantizeToF16,
    CountTrailingZeros,
    CountLeadingZeros,
    CountOneBits,
    ReverseBits,
    ExtractBits,
    InsertBits,
    FirstTrailingBit,
    FirstLeadingBit,
    Pack4x8snorm,
    Pack4x8unorm,
    Pack2x16snorm,
    Pack2x16unorm,
    Pack2x16float,
    Pack4xI8,
    Pack4xU8,
    Pack4xI8Clamp,
    Pack4xU8Clamp,
    Unpack4x8snorm,
    Unpack4x8unorm,
    Unpack2x16snorm,
    Unpack2x16unorm,
    Unpack2x16float,
    Unpack4xI8,
    Unpack4xU8,
}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
Dot4I8Packed
Dot4U8Packed
Outer
Cross
Distance
Length
Normalize
FaceForward
Reflect
Refract
Sign
Fma
Mix
Step
SmoothStep
Sqrt
InverseSqrt
Inverse
Transpose
Determinant
QuantizeToF16
CountTrailingZeros
CountLeadingZeros
CountOneBits
ReverseBits
ExtractBits
InsertBits
FirstTrailingBit
FirstLeadingBit
Pack4x8snorm
Pack4x8unorm
Pack2x16snorm
Pack2x16unorm
Pack2x16float
Pack4xI8
Pack4xU8
Pack4xI8Clamp
Pack4xU8Clamp
Unpack4x8snorm
Unpack4x8unorm
Unpack2x16snorm
Unpack2x16unorm
Unpack2x16float
Unpack4xI8
Unpack4xU8
Implementations§
Source§impl MathFunction
 
impl MathFunction
pub fn overloads(self) -> impl OverloadSet
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 duplicate 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§impl PartialOrd for MathFunction
 
impl PartialOrd for MathFunction
Source§impl TryToWgsl for MathFunction
 
impl TryToWgsl for MathFunction
Source§const DESCRIPTION: &'static str = "math function"
 
const DESCRIPTION: &'static str = "math function"
What kind of WGSL thing 
Self represents.Source§fn try_to_wgsl(self) -> Option<&'static str>
 
fn try_to_wgsl(self) -> Option<&'static str>
impl 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<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
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§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.