Home > Software engineering >  how to get decimal value from the import Ruler from react-native-animated-ruler
how to get decimal value from the import Ruler from react-native-animated-ruler

Time:08-30

Currently, I am getting the integer value I want in the float value. how to achieve it in react-native-animated-ruler.

expo : enter image description here

enter image description here

CodePudding user response:

try to add (value).toFixed(2) to your code.

CodePudding user response:

in library at line 184

this.setState({
          value: Math.round(value / this.snapSegment)   minimum
        });

so you have to change this in package code.

  • Related