File: point.rb

package info (click to toggle)
ruby-cairo 1.16.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,468 kB
  • sloc: ruby: 11,856; ansic: 9,835; sh: 36; makefile: 5
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