snap method

void snap(
  1. double newValue
)

Implementation

void snap(double newValue) {
  value = newValue;
  velocity = 0.0;
}