• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

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