Skip to content

Commit

Permalink
feat: add more constructors for operator (#33)
Browse files Browse the repository at this point in the history
* feat: add constructor for the norm (`∥`) operator

* feat: add more operator constructors
  • Loading branch information
nfejzic authored Dec 26, 2023
1 parent 660a412 commit 71ab5ca
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/elements/mo/dict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ impl Operator {
Self::from("\u{22C5}")
}

/// Create a '¨' operator.
pub fn double_dot() -> Self {
Self::from("\u{00A8}")
}

/// Create a '∗' operator.
pub fn asterisk() -> Self {
Self::from("\u{2217}")
Expand Down Expand Up @@ -191,6 +196,11 @@ impl Operator {
Self::from("\u{2309}")
}

/// Create a '≔' operator.
pub fn assign() -> Self {
Self::from("\u{2254}")
}

/// Create a '=' operator.
pub fn eq() -> Self {
Self::from("\u{003D}")
Expand Down Expand Up @@ -450,4 +460,9 @@ impl Operator {
pub fn larrow() -> Self {
Self::from("\u{2190}")
}

/// Create a '~' operator.
pub fn tilde() -> Self {
Self::from("\u{007E}")
}
}

0 comments on commit 71ab5ca

Please sign in to comment.