getDecimals
Commons
stable
Returns the number of decimal digits in a numeric value by inspecting its string representation. Used by Slider to infer step precision.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- valuerequisnumber
- The number to inspect. Its string form is trimmed before counting digits after the decimal point.
API
Valeur de retour
La valeur retournée par cet util.
- The count of digits after the decimal separator (0 for integers).
Usage
Exemples
Extraits de code prêts à coller.
Count decimal places