mirror of
https://github.com/vrld/HC.git
synced 2024-11-28 14:04:21 +00:00
Fix polygon rotation.
This commit is contained in:
parent
68af2448fd
commit
06ae1d0910
@ -218,7 +218,7 @@ end
|
||||
|
||||
function Polygon:rotate(angle, center, cy)
|
||||
local center = center or self.centroid
|
||||
if cy then center = vector(cy) end
|
||||
if cy then center = vector(center, cy) end
|
||||
for i,v in ipairs(self.vertices) do
|
||||
self.vertices[i] = (self.vertices[i] - center):rotate_inplace(angle) + center
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user