From b3ed35108d5fe93c3aa8101084b695470c488a30 Mon Sep 17 00:00:00 2001 From: Seyon Sivarajah Date: Thu, 9 Jan 2025 09:01:41 +0000 Subject: [PATCH] fix: remove unicode pi symbols in rotation extension (#743) --- tket2-exts/src/tket2_exts/data/tket2/rotation.json | 6 +++--- tket2/src/extension/rotation.rs | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tket2-exts/src/tket2_exts/data/tket2/rotation.json b/tket2-exts/src/tket2_exts/data/tket2/rotation.json index 5c98b42a..f759d09f 100644 --- a/tket2-exts/src/tket2_exts/data/tket2/rotation.json +++ b/tket2-exts/src/tket2_exts/data/tket2/rotation.json @@ -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": { @@ -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": { @@ -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": { diff --git a/tket2/src/extension/rotation.rs b/tket2/src/extension/rotation.rs index 6728e7ea..845f133f 100644 --- a/tket2/src/extension/rotation.rs +++ b/tket2/src/extension/rotation.rs @@ -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). @@ -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).", }