pub enum ExprKind {
Show 31 variants
Entity {
id: EntityIndex,
},
LineLineIntersection {
k: VarIndex,
l: VarIndex,
},
AveragePoint {
items: Vec<VarIndex>,
},
CircleCenter {
circle: VarIndex,
},
ComplexToPoint {
number: VarIndex,
},
Sum {
plus: Vec<VarIndex>,
minus: Vec<VarIndex>,
},
Product {
times: Vec<VarIndex>,
by: Vec<VarIndex>,
},
Const {
value: ProcNum,
},
Exponentiation {
value: VarIndex,
exponent: CompExponent,
},
PointPointDistance {
p: VarIndex,
q: VarIndex,
},
PointLineDistance {
point: VarIndex,
line: VarIndex,
},
ThreePointAngle {
p: VarIndex,
q: VarIndex,
r: VarIndex,
},
ThreePointAngleDir {
p: VarIndex,
q: VarIndex,
r: VarIndex,
},
TwoLineAngle {
k: VarIndex,
l: VarIndex,
},
PointX {
point: VarIndex,
},
PointY {
point: VarIndex,
},
PointToComplex {
point: VarIndex,
},
Real {
number: VarIndex,
},
Imaginary {
number: VarIndex,
},
Log {
number: VarIndex,
},
Exp {
number: VarIndex,
},
Sin {
angle: VarIndex,
},
Cos {
angle: VarIndex,
},
Atan2 {
y: VarIndex,
x: VarIndex,
},
DirectionVector {
line: VarIndex,
},
PointPoint {
p: VarIndex,
q: VarIndex,
},
AngleBisector {
p: VarIndex,
q: VarIndex,
r: VarIndex,
},
ParallelThrough {
point: VarIndex,
line: VarIndex,
},
PerpendicularThrough {
point: VarIndex,
line: VarIndex,
},
PointVector {
point: VarIndex,
vector: VarIndex,
},
ConstructCircle {
center: VarIndex,
radius: VarIndex,
},
}
Expand description
A mathematical expression with a flattened memory model.
Variants§
Entity
An entity referece.
Fields
id: EntityIndex
LineLineIntersection
An intersection of two lines: k
and l
AveragePoint
The arithmetic mean of given point expressions
CircleCenter
Center of a circle.
ComplexToPoint
Convert a complex number to a point (no-op)
Sum
Sum of numbers.
A normalized sum must be sorted and must not contain other sums or negations. An aggregated constant, if any, must be at the end.
Product
Product of numbers.
A normalized product must be sorted and must not contain other products. An aggregated constant, if any, must be at the end.
Const
A constant.
Exponentiation
Raising a value to a power.
PointPointDistance
A distance between two points.
PointLineDistance
A distance of a point from a line.
ThreePointAngle
An angle defined by three points (arm, origin, arm)
ThreePointAngleDir
A directed angle defined by three points (arm, origin, arm)
TwoLineAngle
The angle described by two lines.
PointX
The real part of a point.
PointY
The imaginary part of a point.
PointToComplex
Convert a point to a complex number (no-op)
Real
Real part of a number
Imaginary
Imaginary part of a number
Log
Natural logarithm
Exp
Exponential function (e^this)
Sin
Sine of an angle
Cos
Cosine of an angle
Atan2
Arctan2 function
DirectionVector
Line’s direction vector
PointPoint
A line through two points.
AngleBisector
The angle bisector line.
ParallelThrough
A line parallel to another line
going through a point
PerpendicularThrough
A line perpendicular to another line
going through a point
PointVector
A line made from a point and a direction vector
ConstructCircle
A circle constructed from its center and radius.
Implementations§
Trait Implementations§
Source§impl DeepClone for ExprKind
impl DeepClone for ExprKind
Source§fn deep_clone(&self, arg0: &mut Math) -> Self
fn deep_clone(&self, arg0: &mut Math) -> Self
Source§impl From<ExprKind> for ExpressionKind
impl From<ExprKind> for ExpressionKind
Source§impl FromUnrolled<Circle> for ExprKind
impl FromUnrolled<Circle> for ExprKind
Source§impl FromUnrolled<Line> for ExprKind
impl FromUnrolled<Line> for ExprKind
Source§impl FromUnrolled<Number> for ExprKind
impl FromUnrolled<Number> for ExprKind
Source§impl FromUnrolled<Point> for ExprKind
impl FromUnrolled<Point> for ExprKind
Source§impl Ord for ExprKind
impl Ord for ExprKind
Source§impl PartialOrd for ExprKind
impl PartialOrd for ExprKind
Source§impl Reconstruct for ExprKind
impl Reconstruct for ExprKind
Source§fn reconstruct(self, arg0: &mut ReconstructCtx<'_>) -> Self
fn reconstruct(self, arg0: &mut ReconstructCtx<'_>) -> Self
impl Eq for ExprKind
impl StructuralPartialEq for ExprKind
Auto Trait Implementations§
impl Freeze for ExprKind
impl RefUnwindSafe for ExprKind
impl Send for ExprKind
impl Sync for ExprKind
impl Unpin for ExprKind
impl UnwindSafe for ExprKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneWithNode for Twhere
T: Clone,
impl<T> CloneWithNode for Twhere
T: Clone,
Source§fn clone_with_node(&mut self) -> T
fn clone_with_node(&mut self) -> T
self
and take its node.Source§fn clone_without_node(&self) -> T
fn clone_without_node(&self) -> T
self
without taking its node.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>,
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>,
self
can be converted into a specific type. Read more