North America - English

League of Legends Community

League of Legends Community > League of Legends > General Discussion
How does rounding work in this game?

First Riot Post
  • Page 1 of 3
  • 1
  • 2
  • 3
 
Comment below rating threshold, click here to show it.
Serra ?? Member
This user has accepted the summoners code, click for more information
12-17-2009

Hey devs quick question: With all the really specific numbers in the rune system, it would be nice to know how rounding works. For example: if I get all 0.65% cd glyphs, then my CD reduction is 0.65 * 9 = 5.85%. Does this round to 6% for the game? My goal is 6% so with masteries and 25% cd reduc item, I hit the 40% cap.


Thanks!

(I'm sure people want to know how magic pen and attack damage, etc. works too.)

 
Comment below rating threshold, click here to show it.
Serra ?? Member
This user has accepted the summoners code, click for more information
12-18-2009

no one knows =/?

 
Comment below rating threshold, click here to show it.
SlyGoat ?? Member
This user has accepted the summoners code, click for more information
12-18-2009

It doesn't round AFAIK. But the difference is so minuscule you won't notice it anyway in most cases, obviously.

 
Comment below rating threshold, click here to show it.
hohums hohums's Avatar ?? Software Engineer
This user has accepted the summoners code, click for more information
1 of 4 Riot Posts
12-18-2009

There is no rounding. Some numbers we round visually so that you don't see a zillion decimal places however when computing the math it uses the full numbers.

 
Comment below rating threshold, click here to show it.
Phreak Phreak's Avatar ?? Shoutcaster
This user has accepted the summoners code, click for more information
2 of 4 Riot Posts
12-18-2009

Oh badass, thanks hohums.

 
Comment below rating threshold, click here to show it.
WalterKovacs ?? Member
12-18-2009

Quote:
Originally Posted by hohums View Post
There is no rounding. Some numbers we round visually so that you don't see a zillion decimal places however when computing the math it uses the full numbers.
That's a lie and you know it hohums. There are an infinite number of numbers the computer can't represent even within the range of 0 and 0.5

Anyways...single precision or double? :P

 
Comment below rating threshold, click here to show it.
SchroedingersCat ?? Member
12-18-2009

Quote:
Originally Posted by WalterKovacs View Post
That's a lie and you know it hohums. There are an infinite number of numbers the computer can't represent even within the range of 0 and 0.5

Anyways...single precision or double? :P
Way to pick on words and show of your imba CS skills. Oh, and your math skills, there are many irrationals numbers. Cool.

However, do they use irrational numbers on their runes? No? And can you somehow get to an irrational numbers using any of the four basic numerical operators? No. So who gives a **** about irrationals.

Oh, but lol. What about 0.1 in binary. Single representation of that will be adequate enough to not cause a single integer difference in any of the game played so far.

 
Comment below rating threshold, click here to show it.
Nmaster64 ?? Senior Member
This user has accepted the summoners code, click for more information
12-18-2009

So if I have 10 health and take 9.999999 damage, I won't die and it'll show I have 1 HP?

 
Comment below rating threshold, click here to show it.
Lima Beans Lima Beans's Avatar ?? Core Engineer
This user has accepted the summoners code, click for more information
3 of 4 Riot Posts
12-18-2009

Quote:
Originally Posted by Nmaster64 View Post
So if I have 10 health and take 9.999999 damage, I won't die and it'll show I have 1 HP?

correct.

(unless that 9 repeats infinitely )

 
Comment below rating threshold, click here to show it.
WalterKovacs ?? Member
12-18-2009

Quote:
Originally Posted by SchroedingersCat View Post
Way to pick on words and show of your imba CS skills. Oh, and your math skills, there are many irrationals numbers. Cool.

However, do they use irrational numbers on their runes? No? And can you somehow get to an irrational numbers using any of the four basic numerical operators? No. So who gives a **** about irrationals.

Oh, but lol. What about 0.1 in binary. Single representation of that will be adequate enough to not cause a single integer difference in any of the game played so far.
I know, I was just being a jerk. I just had a Numerical Computing final last night...so it's all stuck in my head.

  • Page 1 of 3
  • 1
  • 2
  • 3