playMaker

Author Topic: [SOLVED] Round Float value to 10's  (Read 446 times)

heavygunner

  • Full Member
  • ***
  • Posts: 202
    • View Profile
[SOLVED] Round Float value to 10's
« on: November 23, 2018, 11:46:36 AM »
Hi !

I wanna get random float value between 200 & 300. But, it should be divided by 10. 200,210,220,230,...........290,300. Only these number.

How can I do that ?
« Last Edit: November 23, 2018, 11:55:03 AM by heavygunner »

heavygunner

  • Full Member
  • ***
  • Posts: 202
    • View Profile
Re: Round Float value to 10's
« Reply #1 on: November 23, 2018, 11:54:44 AM »
Hi !
I fixed it by adding those Numbers to Arrays.
 ;D ;D ;D ;D

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4817
    • View Profile
    • jinxtergames
Re: [SOLVED] Round Float value to 10's
« Reply #2 on: November 23, 2018, 02:19:28 PM »
Hi,
I would do a random in between 20 and 30, then multiply by 10 and convert to float :)