pub enum Unary {
Show 20 variants
Sin,
Cos,
Tan,
Asin,
Acos,
Atan,
Sqrt,
InvSqrt,
Exp,
Log,
Log10,
Abs,
Sign,
Sqr,
Floor,
Ceil,
Int,
BNot,
Rand,
RandInt,
}Expand description
A one-argument builtin.
Variants§
Sin
EEL2’s sin — radians.
Cos
EEL2’s cos — radians.
Tan
EEL2’s tan — radians.
Asin
EEL2’s asin, on an argument clamped into -1..=1.
Acos
EEL2’s acos, on an argument clamped into -1..=1.
Atan
EEL2’s atan.
Sqrt
EEL2’s sqrt, 0 on a negative argument.
InvSqrt
1 / sqrt(x), EEL2’s invsqrt.
Exp
EEL2’s exp.
Log
Natural log, EEL2’s log.
Log10
Base-10 logarithm, EEL2’s log10.
Abs
EEL2’s abs.
Sign
EEL2’s three-way sign: -1, 0 or 1.
Sqr
x * x, EEL2’s sqr.
Floor
EEL2’s floor.
Ceil
EEL2’s ceil.
Int
Truncation toward zero, EEL2’s int.
BNot
EEL2’s bnot: 1 when the argument is zero, else 0.
Rand
rand(x) — a salted deterministic draw in [0, x) (ADR-0051).
RandInt
randint(x) — floor(rand(x)).
Implementations§
Trait Implementations§
impl Copy for Unary
impl Eq for Unary
impl StructuralPartialEq for Unary
Auto Trait Implementations§
impl Freeze for Unary
impl RefUnwindSafe for Unary
impl Send for Unary
impl Sync for Unary
impl Unpin for Unary
impl UnsafeUnpin for Unary
impl UnwindSafe for Unary
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,
§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.