diff options
author | Kenneth Russel <[email protected]> | 2007-03-16 04:17:34 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-03-16 04:17:34 +0000 |
commit | 681b6dd38fd3a92efecdf13740076c5276ca5b29 (patch) | |
tree | 22fdf5888eeba51044ebf2f49aa105505d89a053 /src | |
parent | 7004573742b0b2772bab30c8c540785ddc148691 (diff) |
Simplified math in last putback
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1171 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src')
-rwxr-xr-x | src/classes/com/sun/opengl/util/texture/Texture.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/classes/com/sun/opengl/util/texture/Texture.java b/src/classes/com/sun/opengl/util/texture/Texture.java index ab8997ee8..46d435245 100755 --- a/src/classes/com/sun/opengl/util/texture/Texture.java +++ b/src/classes/com/sun/opengl/util/texture/Texture.java @@ -324,8 +324,8 @@ public class Texture { float tx2 = (float)x2 / (float)texWidth; float ty2 = (float)y2 / (float)texHeight; if (mustFlipVertically) { - float yOffset = 1.0f - ((float) imgHeight / (float) texHeight); - return new TextureCoords(tx1, 1.0f - yOffset - ty1, tx2, 1.0f - yOffset - ty2); + float yMax = (float) imgHeight / (float) texHeight; + return new TextureCoords(tx1, yMax - ty1, tx2, yMax - ty2); } else { return new TextureCoords(tx1, ty1, tx2, ty2); } |