]> git.xonotic.org Git - xonotic/netradiant.git/commit
Importing code changes for q3map2 from Rambetter-math-fix-experiments branch
authorrambetter <rambetter@8a3a26a2-13c4-0310-b231-cf6edde360e5>
Mon, 10 Jan 2011 06:15:47 +0000 (06:15 +0000)
committerrambetter <rambetter@8a3a26a2-13c4-0310-b231-cf6edde360e5>
Mon, 10 Jan 2011 06:15:47 +0000 (06:15 +0000)
commit7006e9eead128058dfe0a5efd121fe3e41e71fc1
tree696c7495b3b54fdfc8ef6127e40ff86b3e4dd0d4
parentf661e5c6e59a33bcdb0b294a1370a9aa598d5f99
Importing code changes for q3map2 from Rambetter-math-fix-experiments branch
into trunk.  Right now all the new code that fixes problems is turned off.
There are three new #defines in q3map2.h:
EXPERIMENTAL_HIGH_PRECISION_MATH_Q3MAP2_FIXES, EXPERIMENTAL_SNAP_NORMAL_FIX,
and EXPERIMENTAL_SNAP_PLANE_FIX.  All of these are currently set to 0, which
means don't enable that new code.  You can easily edit these to be 1 in order
to enable the new code.

There are very very minor changes to the code even with these three #defines
disabled.  They are as follows.

- In PlaneEqual() in map.c, now considering deltas equal to given epsilon
values as "far enough to be different".  Previously, the '<=' operation was
used, now '<' is being used.

- In FindFloatPlane() in map.c, considering delta equal to distanceEpsilon
(for plane distance) to be sufficiently far away.  Before, delta had to be
strictly greater than distanceEpsilon.

- VectorNormalize() in mathlib.c is more accurate now.  This change itself
causes at least one regression test to succeed.  The previous implementation
of VectorNormalize() caused excessive errors to be introduced due to sloppy
arithmetic.

Note, the epsilon changes account for the possibility that the epsilons
are set to 0.0 on the command-line.

git-svn-id: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk@416 8a3a26a2-13c4-0310-b231-cf6edde360e5
libs/mathlib.h
libs/mathlib/mathlib.c
tools/quake3/common/polylib.c
tools/quake3/common/polylib.h
tools/quake3/q3map2/brush.c
tools/quake3/q3map2/map.c
tools/quake3/q3map2/q3map2.h