function LineAngle(const C1,C2 : TPoint) : single; overload; {radians} begin result := ArcTan2(C2.X-C1.X, C2.Y-C2.Y); end; function LineAngle(const X1,Y1,X2,Y2 : integer) : single; overload; {radians} begin result := ArcTan2(X2-X1, Y1-Y2); end;
private double LineAngle(Point P1, Point P2) { return LineAngle(P1.X, P1.Y, P2.X, P2.Y); } private double LineAngle(int P1x, int P1y, int P2x, int P2y) { return Math.Atan2(P1y - P2y, P1x - P2x); }
function LineAngle( x1:Number, y1:Number, x2:Number, y2:Number) : Number { return (Math.atan2(y2-y1, x2-x1) * (180/Math.PI)); }