mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[python/turtle] Fix Turtle::circle for negative angles
This commit is contained in:
@@ -55,7 +55,7 @@ void Turtle::left(mp_float_t angle) {
|
||||
|
||||
void Turtle::circle(mp_int_t radius, mp_float_t angle) {
|
||||
mp_float_t oldHeading = heading();
|
||||
mp_float_t length = (angle*k_headingScale)*radius;
|
||||
mp_float_t length = ((angle > 0 ? 1 : -1) * angle * k_headingScale) * radius;
|
||||
if (length > 1) {
|
||||
int i = 1;
|
||||
while(i <= length) {
|
||||
|
||||
Reference in New Issue
Block a user