/* Simple test of cpDampedRotarySpringSetStiffness().
*/
void test_cpDampedRotarySpringSetStiffness(void)
{
	cpConstraint *spring1 = cpDampedRotarySpringNew(body1, body2, 7, 1, 1);

	cpDampedRotarySpringSetStiffness(spring1, 0.778);
	cpDampedRotarySpring *springCast = (cpDampedRotarySpring*)spring1;
	CU_ASSERT(springCast->stiffness == 0.778);

	cpDampedRotarySpringSetStiffness(spring1, -14.28);
	springCast = (cpDampedRotarySpring*)spring1;
	CU_ASSERT(springCast->stiffness == -14.28);

	cpDampedRotarySpringSetStiffness(spring1, 31);
	springCast = (cpDampedRotarySpring*)spring1;
	CU_ASSERT(springCast->stiffness == 31);
}
void PhysicsJointRotarySpring::setStiffness(float stiffness)
{
    cpDampedRotarySpringSetStiffness(_cpConstraints.front(), PhysicsHelper::float2cpfloat(stiffness));
}