Altered math and ray casting