Ok.. I found a rather clumbsy method that does what I want, So i'll post here for the benefit of others who may want it:

Code:
 
alias Degrees {
  var %x = $abs($calc($1 - $3)), %y = $abs($calc($2 - $4)), $&
    %z = $calc($atan($calc(%y / %x)) * 180 / $pi), %deg
  if ($1 < $3) { %deg = 270 }
  if ($1 > $3) { %deg = 90 }
  if ($2 < $3) { %deg = 0 }
  if ($2 > $3) { %deg = 180 }
  if ($1 < $3) && ($2 < $4) { %deg = 270 + %z }
  if ($1 < $3) && ($2 > $4) { %deg = 270 - %z }
  if ($1 > $3) && ($2 > $4) { %deg = 90 + %z }
  if ($1 > $3) && ($2 < $4) { %deg = 90 - %z }
  var %deg = $gettok(%deg,1,46)
  if (%deg == 180) && ($1 == $3) {
    if ($2 >= $4) %deg = 180
    else %deg = 0
  }
  if (%deg == 180) && ($1 != $3) {
    if ($1 >= $3) %deg = 90
    else %deg = 270
  }
  return %deg
}
 


It works like this: $degrees(X1,Y1,X2,Y2)
X2 and Y2 should be the X Y co-ordinates of the Main dot.
for example:
//echo -a $degrees(250,12,100,300)

It's not the best method, but sufficient for my purposes...