Spring1D.critical constructor

Spring1D.critical({
  1. required double initialValue,
  2. double stiffness = 180.0,
})

Implementation

Spring1D.critical({
  required double initialValue,
  this.stiffness = 180.0,
})  : damping = 2 * math.sqrt(stiffness),
      value = initialValue,
      velocity = 0.0;