I'm writing code for a kind of minigame in another game (Minecraft) in Java and I stumbled upon a problem.
I have two ints, int point 1 and int point 2. They are x coordinates, from ex: -100000 to 100000. But also -10000 to -5000, and 10000 to 20000. So negative to positive, but also negative to negative and positive to positive.
And that is the problem. I need to find a solution how to get random numbers from ex -100 to -50. But the same code has to be used with -100 to 50, and 10 to 50.
If you guys can help me, that'd be great!
Greetings,
Jesse.
PS: If you need a code snippet or something, just say it.