Subdomain Posts
Ruby | 3 days ago
Ruby | 5 days ago
Ruby | 6 days ago
Ruby | 6 days ago
Ruby | 6 days ago
Ruby | 7 days ago
Ruby | 7 days ago
Ruby | 7 days ago
Ruby | 8 days ago
Ruby | 8 days ago
Recent Posts
C# | 20 sec ago
None | 56 sec ago
None | 1 min ago
PHP | 1 min ago
None | 2 min ago
None | 2 min ago
None | 2 min ago
VisualBasic | 3 min ago
None | 3 min ago
HTML | 3 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Anonymous on the 1st of Feb 2010 11:00:27 PM Download | Raw | Embed | Report
  1.       #returns bool for whether a single Point is contained in this Polygon
  2.       def self.contains(point)
  3.         c = 0
  4.         last = rings[rings.length-1]
  5.         rings.each do |ring|
  6.           if (ring.y>point.y) != (last.y>point.y)
  7.             c++ if point.x < (last.x-ring.x) * (point.y-ring.y) / (last.y/ring.y) + ring.x
  8.           end
  9.           last = ring
  10.         end
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: