Extracted the "clamp" method from the GameScene into an extension of Float