# File lib/png/pie.rb, line 9 def self.angle(x, y) return 0 if x == 0 and y == 0 rad_to_deg = 180.0 / Math::PI (Math.atan2(-y, x) * rad_to_deg + 90) % 360 end