From ecff440ceef3ad352aa64cedbb913107ec4863a5 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Tue, 25 Jun 2019 19:19:24 -0400 Subject: [PATCH] Fix regression with refresh --- LA.java | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/LA.java b/LA.java index e1aac14..154bebd 100644 --- a/LA.java +++ b/LA.java @@ -88,6 +88,9 @@ static void vecCopy(cVector a, cVector b) { + Grafreed.Assert (a != null); + assert (b != null); + b.x = a.x; b.y = a.y; b.z = a.z; @@ -307,14 +310,15 @@ } - GrafreeD.Assert(Math.abs(src[0][3]) <= 1E-15); - GrafreeD.Assert(Math.abs(src[1][3]) <= 1E-15); - GrafreeD.Assert(Math.abs(src[2][3]) <= 1E-15); - GrafreeD.Assert(Math.abs(src[3][3] - 1) <= 1E-15); - GrafreeD.Assert(Math.abs(dst[0][3]) <= 1E-15); - GrafreeD.Assert(Math.abs(dst[1][3]) <= 1E-15); - GrafreeD.Assert(Math.abs(dst[2][3]) <= 1E-15); - GrafreeD.Assert(Math.abs(dst[3][3] - 1) <= 1E-15); + // Last row should always be 0 0 0 1 + Grafreed.Assert(Math.abs(src[0][3]) <= 1E-15); + Grafreed.Assert(Math.abs(src[1][3]) <= 1E-15); + Grafreed.Assert(Math.abs(src[2][3]) <= 1E-15); + Grafreed.Assert(Math.abs(src[3][3] - 1) <= 1E-15); + Grafreed.Assert(Math.abs(dst[0][3]) <= 1E-15); + Grafreed.Assert(Math.abs(dst[1][3]) <= 1E-15); + Grafreed.Assert(Math.abs(dst[2][3]) <= 1E-15); + Grafreed.Assert(Math.abs(dst[3][3] - 1) <= 1E-15); } static double toRadians(double degrees) -- Gitblit v1.6.2