Use standard constant for pi instead of 3.14 (#2084)

This commit is contained in:
Tyler Veness
2019-11-15 17:33:18 -08:00
committed by Peter Johnson
parent db2c3dddd7
commit 1b66ead49d
14 changed files with 32 additions and 20 deletions

View File

@@ -30,7 +30,7 @@ public class Robot extends TimedRobot {
@Override
public void robotInit() {
m_encoder.setDistancePerPulse(1.0 / 360.0 * 2.0 * 3.1415 * 1.5);
m_encoder.setDistancePerPulse(1.0 / 360.0 * 2.0 * Math.PI * 1.5);
}
@Override

View File

@@ -29,7 +29,7 @@ public class Robot extends TimedRobot {
@Override
public void robotInit() {
m_encoder.setDistancePerPulse(1.0 / 360.0 * 2.0 * 3.1415 * 1.5);
m_encoder.setDistancePerPulse(1.0 / 360.0 * 2.0 * Math.PI * 1.5);
}
@Override

View File

@@ -54,7 +54,7 @@ public class Robot extends TimedRobot {
* attached to a 3 inch diameter (1.5inch radius) wheel,
* and that we want to measure distance in inches.
*/
m_encoder.setDistancePerPulse(1.0 / 360.0 * 2.0 * 3.1415 * 1.5);
m_encoder.setDistancePerPulse(1.0 / 360.0 * 2.0 * Math.PI * 1.5);
/*
* Defines the lowest rate at which the encoder will