Merge pull request #6093 from dplusic/develop

fixed cc.pGetAngle not using absolute value
This commit is contained in:
James Chen 2014-04-25 13:41:41 +08:00
commit 1b82cd7f08
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ function cc.pGetAngle(self,other)
local a2 = cc.pNormalize(self)
local b2 = cc.pNormalize(other)
local angle = math.atan2(cc.pCross(a2, b2), cc.pDot(a2, b2) )
if angle < 1.192092896e-7 then
if math.abs(angle) < 1.192092896e-7 then
return 0.0
end