6. Intermediate: polar pass-through with controlled rotation
define ROTATION_DEGREES = 15;
int angle;
int radius;
main {
angle = get_ipolar(POLAR_RS, POLAR_ANGLE);
radius = get_ipolar(POLAR_RS, POLAR_RADIUS);
if(get_ival(PS5_L2)) {
angle = angle + ROTATION_DEGREES;
if(angle >= 360) angle = angle - 360;
}
set_polar(POLAR_RS, angle, radius);
}Last updated

