Remove SkScalarSinCos
This differed from the separate versions in that it snapped to zero.
It was also strictly worse than calling the two separate versions.
Most clients don't need the snapping, so just call the two existing
functions. For clients that need the snapping, call new variants of
each that do snap.
Change-Id: Ia4e09fd9651932fe15caeab1399df7f6281bdc17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205303
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
diff --git a/gm/convexpolyclip.cpp b/gm/convexpolyclip.cpp
index 4d702ad..e18de26 100644
--- a/gm/convexpolyclip.cpp
+++ b/gm/convexpolyclip.cpp
@@ -111,8 +111,7 @@
const SkPoint center = { kRadius, kRadius };
for (int i = 0; i < 6; ++i) {
SkScalar angle = 2 * SK_ScalarPI * i / 6;
- SkPoint point;
- point.fY = SkScalarSinCos(angle, &point.fX);
+ SkPoint point = { SkScalarCos(angle), SkScalarSin(angle) };
point.scale(kRadius);
point = center + point;
if (0 == i) {