Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Generate Float Random number

Author
Message
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 9th Aug 2016 19:52
Hi.

I want Generate random number between (0.2,0.5) but i can't generate it because Random command only can generate integer numbers.

Please Guide me to do it.

Thanks.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 9th Aug 2016 20:14
use a higher random number and divide it by / 10.0 or something else.
AGK (Steam) V2.0.20 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 9th Aug 2016 20:19 Edited at: 9th Aug 2016 20:32
Quote: "use a higher random number and divide it by / 10.0 or something else."


is your mean ?

Rand# = Random(10,20) / 10.0
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 9th Aug 2016 20:24
yo
AGK (Steam) V2.0.20 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 9th Aug 2016 20:33
Thanks Markus

Login to post a reply

Server time is: 2024-11-25 04:30:12
Your offset time is: 2024-11-25 04:30:12