Check out example codes for "unitt only 1 number float". It will help you in understanding the concepts better.

Code Example 1

using UnityEngine.UI;

public Text textDivision;
public float division = 1.0/3; // this is equal to 0.33333333333333333333333333...

textDivision.text = division.ToString("F1"); //shows only 0.3

Learn ReactJs, React Native from akashmittal.com