Skip to content

Commit

Permalink
fix: remove unicode pi symbols in rotation extension (#743)
Browse files Browse the repository at this point in the history
  • Loading branch information
ss2165 authored Jan 9, 2025
1 parent 0c6101b commit b3ed351
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions tket2-exts/src/tket2_exts/data/tket2/rotation.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"from_halfturns": {
"extension": "tket2.rotation",
"name": "from_halfturns",
"description": "Construct rotation from number of half-turns (would be multiples of π in radians). Returns None if the float is non-finite.",
"description": "Construct rotation from number of half-turns (would be multiples of PI in radians). Returns None if the float is non-finite.",
"signature": {
"params": [],
"body": {
Expand Down Expand Up @@ -58,7 +58,7 @@
"from_halfturns_unchecked": {
"extension": "tket2.rotation",
"name": "from_halfturns_unchecked",
"description": "Construct rotation from number of half-turns (would be multiples of π in radians). Panics if the float is non-finite.",
"description": "Construct rotation from number of half-turns (would be multiples of PI in radians). Panics if the float is non-finite.",
"signature": {
"params": [],
"body": {
Expand Down Expand Up @@ -125,7 +125,7 @@
"to_halfturns": {
"extension": "tket2.rotation",
"name": "to_halfturns",
"description": "Convert rotation to number of half-turns (would be multiples of π in radians).",
"description": "Convert rotation to number of half-turns (would be multiples of PI in radians).",
"signature": {
"params": [],
"body": {
Expand Down
12 changes: 6 additions & 6 deletions tket2/src/extension/rotation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ impl CustomConst for ConstRotation {
#[non_exhaustive]
/// Rotation operations
pub enum RotationOp {
/// Construct rotation from a floating point number of half-turns (would be multiples of π in radians).
/// Construct rotation from a floating point number of half-turns (would be multiples of PI in radians).
/// Returns an Option, failing when the input is NaN or infinite.
from_halfturns,
/// Construct rotation from a floating point number of half-turns (would be multiples of π in radians).
/// Construct rotation from a floating point number of half-turns (would be multiples of PI in radians).
/// Panics if the input is NaN or infinite.
from_halfturns_unchecked,
/// Convert rotation to number of half-turns (would be multiples of π in radians).
/// Convert rotation to number of half-turns (would be multiples of PI in radians).
to_halfturns,
/// Add two angles together (experimental, may be removed, use float addition
/// first instead if possible).
Expand Down Expand Up @@ -166,13 +166,13 @@ impl MakeOpDef for RotationOp {
fn description(&self) -> String {
match self {
RotationOp::from_halfturns => {
"Construct rotation from number of half-turns (would be multiples of π in radians). Returns None if the float is non-finite."
"Construct rotation from number of half-turns (would be multiples of PI in radians). Returns None if the float is non-finite."
}
RotationOp::from_halfturns_unchecked => {
"Construct rotation from number of half-turns (would be multiples of π in radians). Panics if the float is non-finite."
"Construct rotation from number of half-turns (would be multiples of PI in radians). Panics if the float is non-finite."
}
RotationOp::to_halfturns => {
"Convert rotation to number of half-turns (would be multiples of π in radians)."
"Convert rotation to number of half-turns (would be multiples of PI in radians)."
}
RotationOp::radd => "Add two angles together (experimental).",
}
Expand Down

0 comments on commit b3ed351

Please sign in to comment.