• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Random real or int, performance wise?

Status
Not open for further replies.
Level 7
Joined
Jul 4, 2007
Messages
249
Hi, I've seen that people tend to use int instead of real when using random number. I've read something earlier about it being because it has loads of possibilites, for example it can be 0.135123. Is this a thing people do to increase the performance? For example if I want to have 15% chance of something I usually put
  • (Random real number between 0.00 and 1.00) Less than or equal to 0.15
Instead of
  • (Random integer number between 1 and 100) Less than or equal to 15
 
Status
Not open for further replies.
Top