blockly > FieldNumber > getPrecision
Metoda FieldNumber.getPrecision()
Zwraca aktualną precyzję tego pola. Precyzja określa się jako liczba, do której wartość pola zostanie zaokrąglona. Precyzja wynosząca 0 oznacza, że wartość nie jest zaokrąglona.
Podpis:
getPrecision(): number;
Zwroty:
liczba
Liczba, do której wartość tego pola jest zaokrąglana.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-09-10 UTC.
[null,null,["Ostatnia aktualizacja: 2024-09-10 UTC."],[[["The `getPrecision()` method returns the current precision of a FieldNumber, indicating the level of rounding applied to its value."],["A precision of 0 signifies that the FieldNumber's value is not rounded."],["This method helps determine how the FieldNumber handles and displays numerical values with varying degrees of accuracy."]]],["The `getPrecision()` method, part of the `FieldNumber` class, retrieves the current precision of a field. This precision determines the rounding applied to the field's value. A return value of 0 indicates no rounding is performed. The method outputs a number representing the rounding value.\n"]]