Compute the elastic potential energy stored in a compressed or stretched spring from its stiffness and displacement.
弹簧形变储存的弹性势能。