static void Main(string[] args) { MyNumber num = new MyNumber(3.1415926m); Console.WriteLine(num.ToString("0.0000")); Console.WriteLine("{0:0.0000}", num); }
public void Init(Vector2 gridPos) { m_tileDirector = GetComponent <PlayableDirector>(); m_boardManager = GetComponentInParent <BoardManager>(); m_buttonImage = GetComponent <Image>(); m_myNumberText = GetComponentInChildren <Text>(); m_myNumber = UnityEngine.Random.Range(1, 9); m_myNumberText.text = MyNumber.ToString(); m_buttonImage.color = m_unpressedColour; m_myNumberText.color = m_textUnpressedColour; m_gridPos = gridPos; }
private void CalculateCollatz(string Number) { BigInteger MyNumber; BigInteger.TryParse(Number, out MyNumber); while (MyNumber > 1) { if (MyNumber.IsEven == false) { MyNumber = MyNumber * 3 + 1; UpdateList(MyNumber.ToString()); } else { MyNumber = MyNumber / 2; UpdateList(MyNumber.ToString()); } } }
public void GenerateNewNumber() { m_myNumber = UnityEngine.Random.Range(1, 9); m_myNumberText.text = MyNumber.ToString(); }
public void MatchesUnderlyingValueToString() { var tt = new MyNumber(TestData.WellKnownInt); Assert.That(tt.ToString(), Is.EqualTo(TestData.WellKnownInt.ToString())); }