mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Rename MathUtils to MathUtil for consistency with other util classes (#2155)
This commit is contained in:
committed by
Peter Johnson
parent
d003ec2dc9
commit
8c2ff94d70
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user