diff options
Diffstat (limited to 'docs/examples/Turtle.cpp')
-rw-r--r-- | docs/examples/Turtle.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/examples/Turtle.cpp b/docs/examples/Turtle.cpp index 5275b7cfdb..ec3c55f87f 100644 --- a/docs/examples/Turtle.cpp +++ b/docs/examples/Turtle.cpp @@ -41,8 +41,7 @@ const char* eval(SkCanvas* canvas, const char* s, char e, float& dist, float& l, d = std::min(d, l); dist += d; l -= d; float r = t.h * 0.01745329f; - auto s = sinf(r), c = cosf(r); - Turtle nt = { t.x + s * d, t.y - c * d, t.h, t.p }; + Turtle nt = { t.x + sinf(r) * d, t.y - cosf(r) * d, t.h, t.p }; if (pt && t.p) canvas->drawLine(t.x, t.y, nt.x, nt.y, p()); t = nt; break; |