I think there is something wrong with my for loop?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using BreakInfinity;
using System.Numerics;
public class Notation : MonoBehaviour
{
public int[] length;
public string[] letter;
void Start()
{
length = new int[11] { 7,10,13,16,19,21,24,27,30,33,36};
letter = new string[11] { "K", "M", "B", "T", "q", "Q", "s", "S", "O", "N", "D" };
}
public BigDouble Divide(BigDouble num, int power)
{
return num / Math.Pow(10, power);
}
public string Notate(BigDouble num)
{
int digits = num.ToString().Length;
if (num >= 10000)
{
if (digits > 36)
{
return "infinite";
}
else
{
for (int i = 0; i < 11; i++)
{
return Divide(num, digits - 2).ToString("F2") + letter[i];
}
}
}
else
{
return num.ToString();
}
}
}