"Round by" Option

Started by MagmaPress678 on

Topic category: Feature requests and ideas for MCreator

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
"Round by" Option

I'd like to have the option to round a number by x. For example:

round 1 by 5's = 0

round 4 by 5's = 5

round 11 by 10's = 10

round 28.3 by 10's = 30

I couldn't find an easy way to make this with the current options available and I think it'd be a nice and useful option to have.

Thanks, MagmaPress678.

Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I might be able to help you…
Tue, 06/23/2020 - 10:20

I might be able to help you more if you tell me what you need this for.

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I made a command which…
Tue, 06/23/2020 - 10:28

I made a command which prints a random number in a range, and I want to add the option to get a random number which is a multiple of x(a changable command parameter).

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nevermind, I found a way to…
Tue, 06/23/2020 - 12:58

Nevermind, I found a way to make it. Thanks for the help anyway.

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hey bro, I have the same…
Sun, 01/10/2021 - 20:08

hey bro, I have the same issue, how did you make "custom rounding"??

Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
uhhh i have had this same…
Fri, 03/03/2023 - 23:40

uhhh i have had this same question, i am doing a "Random, 0,1" and i want it to be rounded to the nearest 0.1. And i have no idea how to do this.