diff options
author | Samuel Barney <samjbarney@gmail.com> | 2015-07-09 19:15:37 +0200 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2015-07-09 19:15:37 +0200 |
commit | aa94a275c603e7e8bd65cf1b7440017217a86c17 (patch) | |
tree | 325f7de76044dd8e120919c327d853e605d5828d /src/LinearUpscale.h | |
parent | Network: Fixed ServerHandle's address formatting. (diff) | |
download | cuberite-aa94a275c603e7e8bd65cf1b7440017217a86c17.tar cuberite-aa94a275c603e7e8bd65cf1b7440017217a86c17.tar.gz cuberite-aa94a275c603e7e8bd65cf1b7440017217a86c17.tar.bz2 cuberite-aa94a275c603e7e8bd65cf1b7440017217a86c17.tar.lz cuberite-aa94a275c603e7e8bd65cf1b7440017217a86c17.tar.xz cuberite-aa94a275c603e7e8bd65cf1b7440017217a86c17.tar.zst cuberite-aa94a275c603e7e8bd65cf1b7440017217a86c17.zip |
Diffstat (limited to '')
-rw-r--r-- | src/LinearUpscale.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/LinearUpscale.h b/src/LinearUpscale.h index 1b0fbd89a..d4e9da82a 100644 --- a/src/LinearUpscale.h +++ b/src/LinearUpscale.h @@ -109,11 +109,11 @@ template <typename TYPE> void LinearUpscale2DArray( TYPE RatioY[MAX_UPSCALE_Y]; for (int x = 0; x <= a_UpscaleX; x++) { - RatioX[x] = (TYPE)x / a_UpscaleX; + RatioX[x] = static_cast<TYPE>(x) / a_UpscaleX; } for (int y = 0; y <= a_UpscaleY; y++) { - RatioY[y] = (TYPE)y / a_UpscaleY; + RatioY[y] = static_cast<TYPE>(y) / a_UpscaleY; } // Interpolate each XY cell: @@ -184,15 +184,15 @@ template <typename TYPE> void LinearUpscale3DArray( TYPE RatioZ[MAX_UPSCALE_Z]; for (int x = 0; x <= a_UpscaleX; x++) { - RatioX[x] = (TYPE)x / a_UpscaleX; + RatioX[x] = static_cast<TYPE>(x / a_UpscaleX); } for (int y = 0; y <= a_UpscaleY; y++) { - RatioY[y] = (TYPE)y / a_UpscaleY; + RatioY[y] = static_cast<TYPE>(y / a_UpscaleY); } for (int z = 0; z <= a_UpscaleZ; z++) { - RatioZ[z] = (TYPE)z / a_UpscaleZ; + RatioZ[z] = static_cast<TYPE>(z / a_UpscaleZ); } // Interpolate each XYZ cell: |