- Converting to new repo

This commit is contained in:
2025-09-24 21:20:00 +02:00
parent d94e8dd8b9
commit f7c3654f02
87 changed files with 905 additions and 279 deletions

View File

@@ -0,0 +1,41 @@
/*
* Copyright (C) 2025 UnlegitDqrk - All Rights Reserved
*
* You are unauthorized to remove this copyright.
* You have to give Credits to the Author in your project and link this GitHub site: https://github.com/UnlegitDqrk
* See LICENSE-File if exists
*/
/*
* Copyright (C) 2024 UnlegitDqrk - All Rights Reserved
*
* You are unauthorized to remove this copyright.
* You have to give Credits to the Author in your project and link this GitHub site: https://github.com/UnlegitDqrk
* See LICENSE-File if exists
*/
package dev.unlegitdqrk.unlegitlibrary.number;
import dev.unlegitdqrk.unlegitlibrary.utils.DefaultMethodsOverrider;
import java.util.SplittableRandom;
public class RandomNumber extends DefaultMethodsOverrider {
public static final SplittableRandom random = new SplittableRandom();
public static int random(int min, int max) {
if (min == max) return max;
return random.nextInt(max + 1 - min) + min;
}
public static double random(double min, double max) {
if (min == max) return max;
return min + Math.random() * (max - min);
}
public static float random(float min, float max) {
if (min == max) return max;
return min + (float) Math.random() * (max - min);
}
}