0 Members and 2 Guests are viewing this topic.
Maybe a conversion of data files (decks), Wizards<->MTG game ...endless possibilities.
Does anyone know of a quick way to retrieve a value from a decimal place of a number? For example, I have the decimal number 0.12345678 . Is there a way I can retrive the values of the individual decimal places?
:int(10fpart(0.12345678 ;would get 1, and increase the 10 to more if you want more of the numbers
I want the to grab the individual values though, if I multiply by 100 next time it would get me 12, and by 1000 123. I wanted to be able to retrive just 1, or just 2 or just 8 and so forth. I found a solution too. All i have to do is convert the number to a string, use the sub command to grab whatever part of the string i want, then convert it back to a number!
0.12345678->A1->dim L11->CFor I,1,8AC->BB->L1(dimL1)1+dimL1->dim L1ipart(A-A->A10C->CEnd