Spring constructor
Spring(})
Implementation
Spring(
this.p1,
this.p2, {
this.stiffness = 1.0,
this.kind = SpringKind.structural,
this.dependsOnA,
this.dependsOnB,
}) : restingDistance = _restLength(p1, p2),
restSquared = _restLength(p1, p2) * _restLength(p1, p2);