Hi haithamelfaham, Thanks for spotting this bug. You're absolutely right. I have checked your code, refactored it, and optimized it a little. Can you please check that this version works? As soon as you confirm it, I'll commit the fix and credit you for it. Cheers, Carlo inline CQuaternion& Betw...