File: point.rb

package info (click to toggle)
ruby-cairo 1.15.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 900 kB
  • ctags: 1,364
  • sloc: ansic: 9,174; ruby: 3,620; sh: 116; makefile: 4
file content (7 lines) | stat: -rw-r--r-- 126 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
module Cairo
  class Point
    def distance(other)
      Math.sqrt((other.x - x) ** 2 + (other.y - y) ** 2)
    end
  end
end