Index: samplecode/SampleApp.cpp |
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp |
index 04b1cb02589ceca9c802f20021707ceb731e06cc..82d42fdfc45d94ed7d80ec52729ef578f41ad98a 100644 |
--- a/samplecode/SampleApp.cpp |
+++ b/samplecode/SampleApp.cpp |
@@ -1320,18 +1320,18 @@ |
static const SkScalar gAnimPeriod = 10 * SK_Scalar1; |
static const SkScalar gAnimMag = SK_Scalar1 / 1000; |
SkScalar t = SkScalarMod(secs, gAnimPeriod); |
- if (SkScalarFloorToInt(secs / gAnimPeriod) & 0x1) { |
+ if (SkScalarFloorToInt(SkScalarDiv(secs, gAnimPeriod)) & 0x1) { |
t = gAnimPeriod - t; |
} |
t = 2 * t - gAnimPeriod; |
- t *= gAnimMag / gAnimPeriod; |
+ t = SkScalarMul(SkScalarDiv(t, gAnimPeriod), gAnimMag); |
SkMatrix m; |
m.reset(); |
#if 1 |
m.setPerspY(t); |
#else |
m.setPerspY(SK_Scalar1 / 1000); |
- m.setSkewX(8.0f / 25); |
+ m.setSkewX(SkScalarDiv(8, 25)); |
m.dump(); |
#endif |
canvas->concat(m); |