From 681b6dd38fd3a92efecdf13740076c5276ca5b29 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Fri, 16 Mar 2007 04:17:34 +0000 Subject: 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 --- src/classes/com/sun/opengl/util/texture/Texture.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3