New answers tagged cocos2d-x
While not having experience with Cocos2D, I'd guess that you'll need to replace isnan with std::isnan. If that works, it's a portability bug in Cocos2D because on some compilers/standard libraries some methods can be called without std::.
The goal is to project the vector onto the correct sides of the rectangle. Using the tangens function we're already halfway done. The rest is basic trigonometry. Input data Depending on how you store the rectangle, we have to transform the input data first. This method expects a rectangle that is defined solely by it's size (width w and height h). It's top ...
Top 50 recent answers are included