i think ive fixed my math now. I have to allow some precision loss in
rotation, but this should work.