Rename MathUtils to MathUtil for consistency with other util classes (#2155)

This commit is contained in:
Tyler Veness
2019-12-04 20:39:12 -08:00
committed by Peter Johnson
parent d003ec2dc9
commit 8c2ff94d70
6 changed files with 25 additions and 25 deletions

View File

@@ -23,7 +23,7 @@ import edu.wpi.first.wpilibj.controller.PIDController;
import edu.wpi.first.wpilibj.fixtures.MotorEncoderFixture;
import edu.wpi.first.wpilibj.test.AbstractComsSetup;
import edu.wpi.first.wpilibj.test.TestBench;
import edu.wpi.first.wpiutil.math.MathUtils;
import edu.wpi.first.wpiutil.math.MathUtil;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -184,7 +184,7 @@ public class MotorEncoderTest extends AbstractComsSetup {
Notifier pidRunner = new Notifier(() -> {
var speed = pidController.calculate(me.getEncoder().getDistance());
me.getMotor().set(MathUtils.clamp(speed, -0.2, 0.2));
me.getMotor().set(MathUtil.clamp(speed, -0.2, 0.2));
});
pidRunner.startPeriodic(pidController.getPeriod());
@@ -207,7 +207,7 @@ public class MotorEncoderTest extends AbstractComsSetup {
Notifier pidRunner = new Notifier(() -> {
var speed = filter.calculate(me.getEncoder().getRate());
me.getMotor().set(MathUtils.clamp(speed, -0.3, 0.3));
me.getMotor().set(MathUtil.clamp(speed, -0.3, 0.3));
});
pidRunner.startPeriodic(pidController.getPeriod());