File: point.rb

package info (click to toggle)
ruby-cairo 1.17.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,532 kB
  • sloc: ruby: 11,997; ansic: 10,183; sh: 48; makefile: 4
file content (7 lines) | stat: -rw-r--r-- 112 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
module Cairo
  class Point
    def distance(other)
      Math.hypot(other.x - x, other.y - y)
    end
  end
end