S
S
Sergey Bezrukov2018-09-21 19:03:36
C++ / C#
Sergey Bezrukov, 2018-09-21 19:03:36

What is the best variable to use for the clicker counter?

There is a task - to write a clicker, when using int, the counter rests on the ceiling of 2.14 billion. What can be done to make the counter conditionally infinite (large enough), and to solve this problem as efficiently as possible?
Engine - uni3d, language - C#
Now I use ulong, but maybe there is something more efficient?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
#
#, 2018-09-21
@Hrederik

compare
ulong
decimal
BigInteger
the latter is disproportionately larger, but still finite. was there a big integer limit?
but you have to understand what it is

big integer stores uint[] digits
uint[] in which the digit is uint
ps which of these is available in Unity - I don’t tell you
decimal should be, well, like BigInteger is implemented in Mono, so everything should be available

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question