Upload files to "src/openonyx/history"

This commit is contained in:
winterflyt committed 2026-11-30 06:00:37 +02:00
1 parent 51cb99e2b8
commit 57f447491e
5 files changed
+445

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
package openonyx.history;
import openonyx.history.internal.RangeSetting;
public class RangeRoll {
private double f;
private final boolean H;
private final RangeSetting rangeSetting;
public void L() {
this.f = this.H ? this.rangeSetting.randomInt() : this.rangeSetting.random();
}
public RangeRoll(RangeSetting rangeSetting) {
this.rangeSetting = rangeSettingx;
this.H = rangeSettingx.isInteger();
rangeSettingx.onChange(range -> this.L());
this.L();
}
public int L() {
return (int)Math.round(this.f);
}
public float L() {
return (float)this.f;
}
public double L() {
return this.f;
}
}