Get Random Number - action block

FrameXX

Well-known member
Although MacroDroid allows you to easily set variable value to random number between 2 integers (incluse) it doesn't allow for these integers to be defined by variables.

This action blocks let's you generate a random integer or decimal with value ranging from min (inclusive) to max (inclusive). Even if you accidentally swap the min and max values the output should still be right.

 

Dm114

Well-known member
Although MacroDroid allows you to easily set variable value to random number between 2 integers (incluse) it doesn't allow for these integers to be defined by variables.

This action blocks let's you generate a random integer or decimal with value ranging from min (inclusive) to max (inclusive). Even if you accidentally swap the min and max values the output should still be right.

Hi @FrameXX
I'll have to claim for royalties! 😉😀
 

Dimlos

Well-known member
I think I am the only one who would be so mean, but I still get the same numbers when I repeat the process without weights.
 

Dimlos

Well-known member
Maybe we are talking about this thread.
 

Dm114

Well-known member
What? I mocked some of your works? If so, it wasn't on purpose.
Don't worry my friend (we used to chat a few years ago, don't you remember?): I was joking!

I was just thinking about a thread and questions a guy was wondering a couple of days ago about how to get random numbers in a dynamic range. So I gave him this basic mathematical formula. 😀

We even noticed that the Random MD function doesn't give very good results with too many duplicate numbers... ☹️

Anyway this forum and community is, and has to remain, wide open and every advice, formula or macro published belongs to the whole community. Not only to its writer.

Keep on helping each other!
 

Seh

New member
I used it too many times and got to that this doesn't truly random. Like you will not get some values at all
 
Top