[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnubg] 3D board quirks on Mac OS X solved
From: |
Olivier Baur |
Subject: |
[Bug-gnubg] 3D board quirks on Mac OS X solved |
Date: |
Tue, 19 Aug 2003 04:31:34 +0200 |
Hi all!
I've found where the strange image problems I had with 3D Boards come
from: some sqrt's returning NaN's in the routines that compute rounded
corner vertex coordinates. On the Mac, the following code:
latitude = (float)sin(angle2) * lip;
new_radius = (float)sqrt((lip * lip) - (latitude * latitude));
will return NaN in new_radius when angle2 == PI / 2.
I guess this must come from some rounding problem when converting
sin(angle2) * lip from double to float (?)
I've safe-guarded all risky calls to sqrt (ie, that involve a
substraction) with some MAX (0.0f, ...) macro call (in drawboard3d.c
and misc3d.c)
Change not comitted yet.
-- Olivier
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gnubg] 3D board quirks on Mac OS X solved,
Olivier Baur <=