Usage: $circle(,,,)
this alias returns the x and y values for a circular path that is centered on the values where the circle is in diameter you can also use .x and .y prop to get those values individually. type /circletest to see an example
Useful if you want to draw circular motions.
alias circle {
if ($+($1,$2,$3,$4) isnum) {
var %x = $calc(($3 /2) * $cos($4).deg + $1) , %y = $calc(($3 /2) * $sin($4).deg + $2) , %c
if (!$prop) { %c = %x %y }
else { %c = $iif($prop == x, %x,%y) }
return %c
}
}
alias circletest {
window -p @test
var %q = 1
while (%q <= 360) {
clear @test
drawdot @test 2 10 $circle(300,200,300,%q)
inc %q .5
}
}