mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 17:26:16 +00:00
Changed: #963 Floating point exceptions
This commit is contained in:
parent
a0f9615a87
commit
52269e67d2
1 changed files with 3 additions and 3 deletions
|
@ -111,7 +111,7 @@ CVector CFrustum::projectZ(const CVector &vec) const
|
||||||
CVector ret;
|
CVector ret;
|
||||||
float decalX, decalY;
|
float decalX, decalY;
|
||||||
float w, h;
|
float w, h;
|
||||||
float OOw, OOh;
|
float OOw = 1.0f, OOh = 1.0f;
|
||||||
|
|
||||||
// Fast transform to openGL like axis.
|
// Fast transform to openGL like axis.
|
||||||
CVector pt;
|
CVector pt;
|
||||||
|
@ -123,8 +123,8 @@ CVector CFrustum::projectZ(const CVector &vec) const
|
||||||
decalY= (Top+Bottom);
|
decalY= (Top+Bottom);
|
||||||
w= Right-Left;
|
w= Right-Left;
|
||||||
h= Top-Bottom;
|
h= Top-Bottom;
|
||||||
OOw= 1.0f/w;
|
if (w) OOw /= w;
|
||||||
OOh= 1.0f/h;
|
if (h) OOh /= h;
|
||||||
|
|
||||||
// project to -1..+1.
|
// project to -1..+1.
|
||||||
if(Perspective)
|
if(Perspective)
|
||||||
|
|
Loading…
Reference in a new issue