pub enum NumberData {
Show 29 variants
Generic(Generic<Number>),
Number(ProcNum),
DstLiteral(ProcNum),
SetUnit(Expr<Number>, ComplexUnit),
PointPointDistance(Expr<Point>, Expr<Point>),
PointLineDistance(Expr<Point>, Expr<Line>),
Negate(Expr<Number>),
Add(Expr<Number>, Expr<Number>),
Subtract(Expr<Number>, Expr<Number>),
Multiply(Expr<Number>, Expr<Number>),
Divide(Expr<Number>, Expr<Number>),
ThreePointAngle(Expr<Point>, Expr<Point>, Expr<Point>),
ThreePointAngleDir(Expr<Point>, Expr<Point>, Expr<Point>),
TwoLineAngle(Expr<Line>, Expr<Line>),
Average(ClonedVec<Expr<Number>>),
CircleRadius(Expr<Circle>),
Pow(Expr<Number>, CompExponent),
PointX(Expr<Point>),
PointY(Expr<Point>),
Free,
FromPoint(Expr<Point>),
Real(Expr<Number>),
Imaginary(Expr<Number>),
Log(Expr<Number>),
Exp(Expr<Number>),
Sin(Expr<Number>),
Cos(Expr<Number>),
Atan2(Expr<Number>, Expr<Number>),
Direction(Expr<Line>),
}
Expand description
An unrolled number expression
Variants§
Generic(Generic<Number>)
A generic expression
Number(ProcNum)
A constant
DstLiteral(ProcNum)
A distance literal not meant to be multiplied by the distance unit.
SetUnit(Expr<Number>, ComplexUnit)
Override the expression’s unit.
PointPointDistance(Expr<Point>, Expr<Point>)
Distance between two points.
PointLineDistance(Expr<Point>, Expr<Line>)
Distance of a point from a line.
Negate(Expr<Number>)
Minus expression
Add(Expr<Number>, Expr<Number>)
a + b
Subtract(Expr<Number>, Expr<Number>)
a - b
Multiply(Expr<Number>, Expr<Number>)
a * b
Divide(Expr<Number>, Expr<Number>)
a / b
ThreePointAngle(Expr<Point>, Expr<Point>, Expr<Point>)
Angle defined by three points.
ThreePointAngleDir(Expr<Point>, Expr<Point>, Expr<Point>)
Directed angle defined by three points.
TwoLineAngle(Expr<Line>, Expr<Line>)
Angle between two lines.
Average(ClonedVec<Expr<Number>>)
The arithmetic mean of numbers.
CircleRadius(Expr<Circle>)
Radius of a circle
Pow(Expr<Number>, CompExponent)
Raise a number to a power
PointX(Expr<Point>)
X coordinate of a point
PointY(Expr<Point>)
Y coordinate of a point
Free
A free number.
FromPoint(Expr<Point>)
A point as a complex number
Real(Expr<Number>)
Real part of a number
Imaginary(Expr<Number>)
Imaginary part of a number
Log(Expr<Number>)
Natural logarithm (base e)
Exp(Expr<Number>)
Exp function (e^this)
Sin(Expr<Number>)
Sine
Cos(Expr<Number>)
Cosine
Atan2(Expr<Number>, Expr<Number>)
Atan2
Direction(Expr<Line>)
A line’s direction vector
Trait Implementations§
Source§impl CloneWithNode for NumberData
impl CloneWithNode for NumberData
Source§fn clone_with_node(&mut self) -> Self
fn clone_with_node(&mut self) -> Self
Clone
self
and take its node.Source§fn clone_without_node(&self) -> Self
fn clone_without_node(&self) -> Self
Clone
self
without taking its node.Source§impl Debug for NumberData
impl Debug for NumberData
Auto Trait Implementations§
impl Freeze for NumberData
impl !RefUnwindSafe for NumberData
impl !Send for NumberData
impl !Sync for NumberData
impl Unpin for NumberData
impl !UnwindSafe for NumberData
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> Convert for T
impl<T> Convert for T
Source§fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
Convert
self
into a specific type. Read moreSource§fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
Check if
self
can be converted into a specific type. Read more