Merge pull request #3131 from NativeScript/niliev/app-settings-update

updated Cookbook article application-settings
This commit is contained in:
Nick Iliev
2016-11-21 18:15:27 +02:00
committed by GitHub

View File

@ -17,6 +17,7 @@ Using application settings methods requires to load "application settings" modul
{%snippet application-settings-string%} {%snippet application-settings-string%}
### Set and get numeric value. ### Set and get numeric value.
Use this method to set numbers with floating point and up to 9 digits long. For larger numbers use `setString`.
We use `toFixed()` here in order to avoid floating point errors - ex: `54.321` becoming `54.320999999537`. We use `toFixed()` here in order to avoid floating point errors - ex: `54.321` becoming `54.320999999537`.
Beware the result of `toFixed()` is a string not a number therefore you cannot use `===` or `!==` when comparing with a number. Beware the result of `toFixed()` is a string not a number therefore you cannot use `===` or `!==` when comparing with a number.
{%snippet application-settings-number%} {%snippet application-settings-number%}