Delphi Number Manipulation

For manipulating number in Delphi you can try code bellow:

Math.ceil(arg) – lowest integer >= arg
exp(N) – returns eN
Math.floor(arg) – highest integer <= arg
frac(N) – fractional part of N
int(N) – integer part of real number N
Math.log10(N) – log to the base 10 of N
Math.log2(N) – log to the base 2 of N
Random – random number in the range 0..1
Randomize – initialize random number generator
RandSeed – Seed value for random number generator.
Round(N) – round N to nearest whole number. Midway
values rounded to even number.
Math.RoundTo(N,d) – round N to 10d

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.