title: React Native - How to round value of Animated component?
body: <p>I want to create text animation using <code>Animated API</code> but the value of animated has decimal, I want to rounded that value, is it possible?</p>
  
  <p>I've tried using <code>Math.round()</code> but the output is <code>NaN</code>,</p>
  
  <p>here's the code:</p>
  
  <pre><code>const AnimatedText = Animated.createAnimatedComponent(CustomText);
  
  
  export default class App extends Component {
    constructor(props) {
      super(props);
      this.visited = new Animated.Value(0)
    }
  
    componentWillMount(){
      Animated.timing(this.visited,{
        toValue: 1,
        duration:1000,
      }).start();
    }
  
    render(){
      const visiting = this.visited.interpolate({
        inputRange: [0, 1],
        outputRange: [0, 20],
      });
      return(
        &lt;AnimatedText style={{fontSize:40, color:'white', fontWeight:'900'}}&gt;{visiting}&lt;/AnimatedText&gt;
      )
    }
  }
  </code></pre>