function Spring.new(J,Y)local U=J or 0 Y=Y or os.clock return setmetatable({_clock=Y;_time0=Y(),_position0=U,_velocity0=0*U;_target=U;_damper=1,_speed=1},Spring)end
--- Creates a new spring
-- @param initial A number or Vector3 (anything with * number and addition/subtraction defined)
-- @param[opt=os.clock] clock function to use to update spring
function Spring.new(initial, clock)
	local target = initial or 0
	clock = clock or os.clock
	return setmetatable({
		_clock = clock,
		_time0 = clock(),
		_position0 = target,
		_velocity0 = 0 * target,
		_target = target,
		_damper = 1,
		_speed = 1,
	}, Spring)
end
