Enum carlotk::BinaryOperation
source · pub enum BinaryOperation {
Add,
Sub,
Mul,
Div,
}Expand description
Defines binary operations in Carlo.
Variants§
Implementations§
source§impl BinaryOperation
impl BinaryOperation
sourcepub fn simplify(&self, left: &Expression, right: &Expression) -> Expression
pub fn simplify(&self, left: &Expression, right: &Expression) -> Expression
Simplifies this binary operation.
sourcepub fn oper_value(&self, left: &f64, right: &f64) -> f64
pub fn oper_value(&self, left: &f64, right: &f64) -> f64
Operate on two numbers.
Trait Implementations§
source§impl Clone for BinaryOperation
impl Clone for BinaryOperation
source§fn clone(&self) -> BinaryOperation
fn clone(&self) -> BinaryOperation
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 BinaryOperation
impl Debug for BinaryOperation
source§impl Display for BinaryOperation
impl Display for BinaryOperation
impl Copy for BinaryOperation
Auto Trait Implementations§
impl RefUnwindSafe for BinaryOperation
impl Send for BinaryOperation
impl Sync for BinaryOperation
impl Unpin for BinaryOperation
impl UnwindSafe for BinaryOperation
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