Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unicode pi symbols in rotation extension #743

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading