Jump to content

Specify precision for floating-point numbers when setting XML args / data


photo

Recommended Posts

Posted

I have a dmat4 where one of the elements is both large and with several significant digits following the decimal point: -52016.774965. When I call Xml::setDMat4Arg using this dmat4 and then write the XML to a file, this element value has been rounded to -52016.8. This results in strange behavior in my application when I later read this XML arg back in and try to work with it.

 

Workaround is to write my own mySetDMat4Arg function with different String::format parameters than are used by Xml::setDMat4Arg, but it would be nice if this weren't necessary.

Posted

Hi Adam,

 

We have an issue in our bug tracker regarding losing the precision while working with doubles / floats. We will try to solve it ASAP.

 

I'm afraid. currently the best way to fix it - to use custom methods.

 

Sorry for the inconvenience caused.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

  • 5 months later...
Posted

Hi,

Fix for this issue will be available in next SDK release.

×
×
  • Create New...