[wpimath] Deduplicate angle modulus functions (#2998)

frc::NormalizeAngle(), units::math::NormalizeAngle(), and
frc::GetModulusError() were replaced with frc::InputModulus() and
frc::AngleModulus().

They were placed in wpimath/src/main/native/include/frc/MathUtil.h for
C++ and wpimath/src/main/java/edu/wpi/first/wpiutil/math/MathUtil.java
for Java.
This commit is contained in:
Tyler Veness
2021-01-01 16:22:00 -08:00
committed by GitHub
parent bf8c0da4be
commit 62f0f8190d
23 changed files with 210 additions and 219 deletions

View File

@@ -8,7 +8,7 @@ public final class DevMain {
/** Main entry point. */
public static void main(String[] args) {
System.out.println("Hello World!");
System.out.println(MathUtil.normalizeAngle(-5.0));
System.out.println(MathUtil.angleModulus(-5.0));
}
private DevMain() {}