Skip to content

Commit

Permalink
yeah so tests broke lol
Browse files Browse the repository at this point in the history
  • Loading branch information
penguinencounter committed Jan 13, 2024
1 parent 03372dd commit b5199a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Move(forward: LengthUnit, right: LengthUnit, turn: RotationUnit) {
val turn = turn.to.radians

companion object {
private const val RAMP_ALPHA = 0.15
const val RAMP_ALPHA = 0.15
private const val RAMP_EPSILON = 0.01

@JvmStatic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class TestSpeedToPower {
@Test
fun `test positive spread`() {
for (i in 1 until 100) {
assert(Move.rampSpeedToPower(i / 100.0) in (0.2).rangeTo(1.0)) {
assert(Move.rampSpeedToPower(i / 100.0) in (Move.RAMP_ALPHA).rangeTo(1.0)) {
"${Move.rampSpeedToPower(i / 100.0)} (for k=${i/100.0}) is too small"
}
}
Expand All @@ -58,7 +58,7 @@ class TestSpeedToPower {
@Test
fun `test negative spread`() {
for (i in 1 until 100) {
assert(Move.rampSpeedToPower(i / -100.0) in (-1.0).rangeTo(-.2)) {
assert(Move.rampSpeedToPower(i / -100.0) in (-1.0).rangeTo(-Move.RAMP_ALPHA)) {
"${Move.rampSpeedToPower(i / -100.0)} (for k=${i / -100.0}) is too small"
}
}
Expand Down

0 comments on commit b5199a4

Please sign in to comment.