chore: half sweeping angle

pull/161/head
Allison Ryan 4 years ago
parent 5cce9831fe
commit b63167d869

@ -196,8 +196,8 @@ class _FlipperJoint extends RevoluteJoint {
lock();
}
/// The total angle of the arc motion.
static const _sweepingAngle = 1.222;
/// Half the angle of the arc motion.
static const _halfSweepingAngle = 0.611;
final BoardSide side;
@ -206,7 +206,7 @@ class _FlipperJoint extends RevoluteJoint {
/// The joint is locked when initialized in order to force the [Flipper]
/// at its resting position.
void lock() {
const angle = _sweepingAngle / 2;
const angle = _halfSweepingAngle;
setLimits(
-angle * side.direction,
-angle * side.direction,
@ -215,7 +215,7 @@ class _FlipperJoint extends RevoluteJoint {
/// Unlocks the [Flipper] from its resting position.
void unlock() {
const angle = _sweepingAngle / 2;
const angle = _halfSweepingAngle;
setLimits(-angle, angle);
}
}

Loading…
Cancel
Save