These identifiers are my solution for degree and length-related problems in picwins. If you use it, please credit me, it was a true brainfuck. Here's what they do:
- $length requires 4 parameters: point 1 x, point 1 y, point 2 x, point 2 y. It calculates the distance between those points.
- $GetPoint requires 4 parameters: starting x, starting y, degrees, distance. It finds the point in the picwin that is located at the distance and degree of the starting point. It returns both the X and Y !!!!
- $GetAngle1 calculates the direction of point 2 seen from point 1. So, if point 2 is right above point 1 the angle will be 0. Requires 4 parameters: Point 1 x, point 1 y, point 2 x, point 2 y.
- $GetAngle2 calculates the angle between 3 points !!!!!!!!! YAY. It returns the angle of point 1. Parameters: Point 1 x, point 1 y, point 2 x, point 2 y, Point 3 x, point 3 y.
alias length return $sqrt($calc(($1 - $3) ^2 + ($2 - $4) ^2))
alias getpoint return $calc($1 + $sin($calc($3)).deg * $4) $calc($2 - $cos($calc($3)).deg * $4)
alias GetAngle1 return $atan($calc(($3 - $1) / ($4 - $2))).deg
alias GetAngle2 return $abs($calc($getangle1($1 , $2 , $3 , $4) - $getangle1( $1 , $2 , $5 , $6)))