diff --git a/wpimath/src/main/java/edu/wpi/first/math/MathUtil.java b/wpimath/src/main/java/edu/wpi/first/math/MathUtil.java index 044cddfab6..5bf89d7e81 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/MathUtil.java +++ b/wpimath/src/main/java/edu/wpi/first/math/MathUtil.java @@ -126,7 +126,7 @@ public final class MathUtil { } /** - * Wraps an angle to the range -pi to pi radians. + * Wraps an angle to the range -π to π radians. * * @param angleRadians Angle to wrap in radians. * @return The wrapped angle. diff --git a/wpimath/src/main/java/edu/wpi/first/math/filter/LinearFilter.java b/wpimath/src/main/java/edu/wpi/first/math/filter/LinearFilter.java index 4af3da002c..4a5add4f15 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/filter/LinearFilter.java +++ b/wpimath/src/main/java/edu/wpi/first/math/filter/LinearFilter.java @@ -80,7 +80,7 @@ public class LinearFilter { * Creates a one-pole IIR low-pass filter of the form: y[n] = (1-gain) x[n] + gain y[n-1] where * gain = e-dt / T, T is the time constant in seconds. * - *
Note: T = 1 / (2 pi f) where f is the cutoff frequency in Hz, the frequency above which the + *
Note: T = 1 / (2πf) where f is the cutoff frequency in Hz, the frequency above which the * input starts to attenuate. * *
This filter is stable for time constants greater than zero. @@ -101,7 +101,7 @@ public class LinearFilter { * Creates a first-order high-pass filter of the form: y[n] = gain x[n] + (-gain) x[n-1] + gain * y[n-1] where gain = e-dt / T, T is the time constant in seconds. * - *
Note: T = 1 / (2 pi f) where f is the cutoff frequency in Hz, the frequency below which the + *
Note: T = 1 / (2πf) where f is the cutoff frequency in Hz, the frequency below which the * input starts to attenuate. * *
This filter is stable for time constants greater than zero. diff --git a/wpimath/src/main/java/edu/wpi/first/math/geometry/Rotation2d.java b/wpimath/src/main/java/edu/wpi/first/math/geometry/Rotation2d.java index 3eeac17a8f..49cf4c3c7d 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/geometry/Rotation2d.java +++ b/wpimath/src/main/java/edu/wpi/first/math/geometry/Rotation2d.java @@ -164,7 +164,7 @@ public class Rotation2d } /** - * Adds two rotations together, with the result being bounded between -pi and pi. + * Adds two rotations together, with the result being bounded between -π and π. * *
For example, Rotation2d.fromDegrees(30).plus(Rotation2d.fromDegrees(60)) equals
* Rotation2d(Math.PI/2.0)
@@ -251,7 +251,7 @@ public class Rotation2d
* Returns the radian value of the Rotation2d.
*
* @return The radian value of the Rotation2d.
- * @see edu.wpi.first.math.MathUtil#angleModulus(double) to constrain the angle within (-pi, pi]
+ * @see edu.wpi.first.math.MathUtil#angleModulus(double) to constrain the angle within (-π, π]
*/
@JsonProperty
public double getRadians() {
diff --git a/wpimath/src/main/native/include/frc/MathUtil.h b/wpimath/src/main/native/include/frc/MathUtil.h
index 9bb70a0a5f..a0447ee2a1 100644
--- a/wpimath/src/main/native/include/frc/MathUtil.h
+++ b/wpimath/src/main/native/include/frc/MathUtil.h
@@ -159,7 +159,7 @@ constexpr bool IsNear(T expected, T actual, T tolerance, T min, T max) {
}
/**
- * Wraps an angle to the range -pi to pi radians (-180 to 180 degrees).
+ * Wraps an angle to the range -π to π radians (-180 to 180 degrees).
*
* @param angle Angle to wrap.
*/
diff --git a/wpimath/src/main/native/include/frc/filter/LinearFilter.h b/wpimath/src/main/native/include/frc/filter/LinearFilter.h
index 0d21b7a9f6..d51abf2bbf 100644
--- a/wpimath/src/main/native/include/frc/filter/LinearFilter.h
+++ b/wpimath/src/main/native/include/frc/filter/LinearFilter.h
@@ -118,7 +118,7 @@ class LinearFilter {
* y[n] = (1 - gain) x[n] + gain y[n-1]
* where gain = e-dt / T, T is the time constant in seconds
*
- * Note: T = 1 / (2 pi f) where f is the cutoff frequency in Hz, the frequency
+ * Note: T = 1 / (2πf) where f is the cutoff frequency in Hz, the frequency
* above which the input starts to attenuate.
*
* This filter is stable for time constants greater than zero.
@@ -138,7 +138,7 @@ class LinearFilter {
* y[n] = gain x[n] + (-gain) x[n-1] + gain y[n-1]
* where gain = e-dt / T, T is the time constant in seconds
*
- * Note: T = 1 / (2 pi f) where f is the cutoff frequency in Hz, the frequency
+ * Note: T = 1 / (2πf) where f is the cutoff frequency in Hz, the frequency
* below which the input starts to attenuate.
*
* This filter is stable for time constants greater than zero.
diff --git a/wpimath/src/main/native/include/frc/geometry/Rotation2d.h b/wpimath/src/main/native/include/frc/geometry/Rotation2d.h
index d35dc8330c..f58684809c 100644
--- a/wpimath/src/main/native/include/frc/geometry/Rotation2d.h
+++ b/wpimath/src/main/native/include/frc/geometry/Rotation2d.h
@@ -67,8 +67,8 @@ class WPILIB_DLLEXPORT Rotation2d {
}
/**
- * Adds two rotations together, with the result being bounded between -pi and
- * pi.
+ * Adds two rotations together, with the result being bounded between -π and
+ * π.
*
* For example, Rotation2d{30_deg} + Rotation2d{60_deg} equals
* Rotation2d{units::radian_t{std::numbers::pi/2.0}}
@@ -158,7 +158,7 @@ class WPILIB_DLLEXPORT Rotation2d {
* Returns the radian value of the rotation.
*
* @return The radian value of the rotation.
- * @see AngleModulus to constrain the angle within (-pi, pi]
+ * @see AngleModulus to constrain the angle within (-π, π]
*/
constexpr units::radian_t Radians() const { return m_value; }