-
|
I can wrap everything with For example: { x: 1.128201974712 }Becomes: const settings = new Jolt.JoltSettings();
settings.maxPrecision = 4
{ x: 1.1282 } |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
I have no idea what you're talking about. What prints this string anyway? Jolt barely has functions that work with strings. |
Beta Was this translation helpful? Give feedback.
-
|
Nothing prints this specific string, it's just an example. My question is - can I control the precision length of any value returned by any Jolt method at a global level? |
Beta Was this translation helpful? Give feedback.
-
|
No, Jolt uses standard IEEE 754 floating point calculations, which do not represent numbers as decimal values and therefore do not have the concept of 'number of decimals' unless converted to a string. Jolt does not return values as strings. |
Beta Was this translation helpful? Give feedback.
No, Jolt uses standard IEEE 754 floating point calculations, which do not represent numbers as decimal values and therefore do not have the concept of 'number of decimals' unless converted to a string. Jolt does not return values as strings.