|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Float Precision in ASE Files
----- Original Message -----
From: christian audebert <christian.audebert@wanadoo.fr>
Subject: Re: Float Precision in ASE Files
> no, absolutely nothing problem.it work perfectly.
> if you need, you can change number of digit after decimal in ase exporter.
> eomer
Someone else told me that you can't trust the lower precision digits
(i.e. the exporter gives you garbage). See below.
Yohanes Yogi Wahyu P.
ironwill@bdg.centrin.net.id (home)
yogi@students.if.itb.ac.id (school)
----- Original Message -----
From: Blake Senftner <bsenftner@rotor.net>
To: 'Algorithms List' <algorithms@3dgamedev.com>
Sent: Friday, April 28, 2000 12:22 AM
Subject: Re: [algorithms] Float Precision in ASE Files
> Gee... you've uncovered problem #1001 with the ASE exporter. ;)
>
> Notice on the export popup it allows the user to specify how
> much precision they would like? Well, that is bogus too. It will
> cause garbage in the lower precision digits.
>
> Take the ASE exporter source, open file export.cpp and modify
> the routine that exports floating point values like this:
>
> TSTR AsciiExp::Format(float value)
> {
> TCHAR buf[40];
>
> // mofified for scientific notation output:
> // sprintf(buf, szFmtStr, value);
> // CommaScan(buf);
> sprintf(buf, "%g", value);
>
> return TSTR(buf);
> }
>
> Any standard routine, like atof(), will still understand
> the scientific notation and you'll get the necessary precision
> for whatever value is being written.
>
> -Blake
>
=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once
To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html
|
|