Enum naga::MathFunction
source · pub enum MathFunction {
Show 75 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,
QuantizeToF16,
CountTrailingZeros,
CountLeadingZeros,
CountOneBits,
ReverseBits,
ExtractBits,
InsertBits,
FirstTrailingBit,
FirstLeadingBit,
Pack4x8snorm,
Pack4x8unorm,
Pack2x16snorm,
Pack2x16unorm,
Pack2x16float,
Pack4xI8,
Pack4xU8,
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
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
Unpack4x8snorm
Unpack4x8unorm
Unpack2x16snorm
Unpack2x16unorm
Unpack2x16float
Unpack4xI8
Unpack4xU8
Implementations§
source§impl MathFunction
impl MathFunction
pub const fn argument_count(&self) -> usize
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for MathFunction
impl<'arbitrary> Arbitrary<'arbitrary> for MathFunction
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§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<'de> Deserialize<'de> for MathFunction
impl<'de> Deserialize<'de> for MathFunction
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 moresource§impl Serialize for MathFunction
impl Serialize for MathFunction
impl Copy for MathFunction
impl Eq for MathFunction
impl StructuralEq for MathFunction
impl StructuralPartialEq for MathFunction
Auto Trait Implementations§
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.