   h = Math.sqrt( x*x + y*y )
   theta = Math.acos( a / h )
   if x < 0
-    if y < 0 then Math.PI + theta else Math.PI - theta
+    if y < 0 then pi + theta else pi - theta
   else
-    if y < 0 then 2 * Math.PI - theta else theta
+    if y < 0 then 2 * pi - theta else theta
+
+# calculates the euclidean distance between two things
+euclid = ( t1, t2 ) ->
+  x = t1.x - t2.x
+  y = t1.y - t2.y
+  Math.sqrt( x*x + y*y )
 
 grep = ( ar, f ) ->
   x for x in ar when f(x)

    [ x, y ] = @edgePoint a
    @drawCircle x, y, @eyeSize, 'black'
  drawTail: ->
    a = @angle + Math.PI
    [ x1, y1 ] = @edgePoint a
    [ x2, y2 ] = @edgePoint a, @radius + @tailSize
    c = @ctx()

      instance.x       = x
      instance.y       = y
      instance.context = c.getContext '2d'
      instance.angle   = pi * 1.5 # heading up
      instance.draw()
      instance.x       = oldX
      instance.y       = oldY
