Author: Not specified Language: python
Description: Not specified Timestamp: 2018-04-12 11:44:31 +0000
View raw paste Reply
  1. def which_side(a, b, c):
  2.     # Returns side of point 'c' from 'a->b' road
  3.     if ((b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x)) > 0:
  4.         return 'left'
  5.     else:
  6.         return 'right'
View raw paste Reply