On Thursday, May 30, 2013 5:20:27 AM UTC-3, Gerardo Marset wrote: > Also it seems you can replace the call to float() in my version for > another call to math.ceil(), and that makes it slightly faster. No, I'm not > even kidding. >
About this, I found yet another faster way. You can add 0.0 to (x2 - ox) to convert the value to a float a lot faster than float() or math.ceil(). With this, the method is just as fast as (if not slightly faster than) the current version, even if both implement the int() and xrange() optimizations I mentioned earlier. -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cocos-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
