diff options
| author | Stephen Hines <srhines@google.com> | 2012-04-04 22:28:35 -0700 |
|---|---|---|
| committer | Stephen Hines <srhines@google.com> | 2012-04-04 22:28:35 -0700 |
| commit | 92abb6399cde965882cf6dfba59f112a213161e0 (patch) | |
| tree | ebdbb02941474ccb3f36043726fa62b52220077c | |
| parent | 5e00ed25de1135e113b7f1e20a32659736461aa0 (diff) | |
| download | android_development-92abb6399cde965882cf6dfba59f112a213161e0.tar.gz android_development-92abb6399cde965882cf6dfba59f112a213161e0.tar.bz2 android_development-92abb6399cde965882cf6dfba59f112a213161e0.zip | |
Convert fp constants from double -> float.
Change-Id: I5fff1660549473a45dafd3406f22005024655ad7
| -rw-r--r-- | samples/RenderScript/Balls/src/com/example/android/rs/balls/ball_physics.rs | 8 | ||||
| -rw-r--r-- | samples/RenderScript/Balls/src/com/example/android/rs/balls/balls.rs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/samples/RenderScript/Balls/src/com/example/android/rs/balls/ball_physics.rs b/samples/RenderScript/Balls/src/com/example/android/rs/balls/ball_physics.rs index 0d9bdc3ca..8a3db6d76 100644 --- a/samples/RenderScript/Balls/src/com/example/android/rs/balls/ball_physics.rs +++ b/samples/RenderScript/Balls/src/com/example/android/rs/balls/ball_physics.rs @@ -95,7 +95,7 @@ void root(const Ball_t *ballIn, Ball_t *ballOut, const BallControl_t *ctl, uint3 float d = gMaxPos.x - ballOut->position.x; if (d < 0.f) { if (ballOut->delta.x > 0) { - ballOut->delta.x *= -0.7; + ballOut->delta.x *= -0.7f; } ballOut->position.x = gMaxPos.x; } else { @@ -107,7 +107,7 @@ void root(const Ball_t *ballIn, Ball_t *ballOut, const BallControl_t *ctl, uint3 float d = ballOut->position.x - gMinPos.x; if (d < 0.f) { if (ballOut->delta.x < 0) { - ballOut->delta.x *= -0.7; + ballOut->delta.x *= -0.7f; } ballOut->position.x = gMinPos.x + 1.f; } else { @@ -119,7 +119,7 @@ void root(const Ball_t *ballIn, Ball_t *ballOut, const BallControl_t *ctl, uint3 float d = gMaxPos.y - ballOut->position.y; if (d < 0.f) { if (ballOut->delta.y > 0) { - ballOut->delta.y *= -0.7; + ballOut->delta.y *= -0.7f; } ballOut->position.y = gMaxPos.y; } else { @@ -131,7 +131,7 @@ void root(const Ball_t *ballIn, Ball_t *ballOut, const BallControl_t *ctl, uint3 float d = ballOut->position.y - gMinPos.y; if (d < 0.f) { if (ballOut->delta.y < 0) { - ballOut->delta.y *= -0.7; + ballOut->delta.y *= -0.7f; } ballOut->position.y = gMinPos.y + 1.f; } else { diff --git a/samples/RenderScript/Balls/src/com/example/android/rs/balls/balls.rs b/samples/RenderScript/Balls/src/com/example/android/rs/balls/balls.rs index 39bebbfbe..dcdd586b0 100644 --- a/samples/RenderScript/Balls/src/com/example/android/rs/balls/balls.rs +++ b/samples/RenderScript/Balls/src/com/example/android/rs/balls/balls.rs @@ -42,7 +42,7 @@ void initParts(int w, int h) float r = rsRand(100.f); if (r > 90.f) { - balls1[ct].size += pow(10.f, rsRand(0.f, 2.f)) * 0.07; + balls1[ct].size += pow(10.f, rsRand(0.f, 2.f)) * 0.07f; } } } |
