[wpimath] Replace pi with symbol in docs (#7322)

This commit is contained in:
Tyler Veness
2024-11-01 17:16:18 -07:00
committed by GitHub
parent 2cfe114c78
commit dfd1084526
6 changed files with 11 additions and 11 deletions

View File

@@ -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.

View File

@@ -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<sup>-dt / T</sup>, T is the time constant in seconds.
*
* <p>Note: T = 1 / (2 pi f) where f is the cutoff frequency in Hz, the frequency above which the
* <p>Note: T = 1 / (2πf) where f is the cutoff frequency in Hz, the frequency above which the
* input starts to attenuate.
*
* <p>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<sup>-dt / T</sup>, T is the time constant in seconds.
*
* <p>Note: T = 1 / (2 pi f) where f is the cutoff frequency in Hz, the frequency below which the
* <p>Note: T = 1 / (2πf) where f is the cutoff frequency in Hz, the frequency below which the
* input starts to attenuate.
*
* <p>This filter is stable for time constants greater than zero.

View File

@@ -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 π.
*
* <p>For example, <code>Rotation2d.fromDegrees(30).plus(Rotation2d.fromDegrees(60))</code> equals
* <code>Rotation2d(Math.PI/2.0)</code>
@@ -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() {

View File

@@ -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.
*/

View File

@@ -118,7 +118,7 @@ class LinearFilter {
* y[n] = (1 - gain) x[n] + gain y[n-1]<br>
* where gain = e<sup>-dt / T</sup>, 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]<br>
* where gain = e<sup>-dt / T</sup>, 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.

View File

@@ -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, <code>Rotation2d{30_deg} + Rotation2d{60_deg}</code> equals
* <code>Rotation2d{units::radian_t{std::numbers::pi/2.0}}</code>
@@ -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; }