mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-06 07:46:08 +00:00
Cleanup SRC
This commit is contained in:
@@ -1,49 +1,41 @@
|
||||
package com.volmit.iris.util;
|
||||
|
||||
public class CDou
|
||||
{
|
||||
private double number;
|
||||
private double max;
|
||||
|
||||
public CDou(double max)
|
||||
{
|
||||
number = 0;
|
||||
this.max = max;
|
||||
}
|
||||
|
||||
public CDou set(double n)
|
||||
{
|
||||
number = n;
|
||||
circ();
|
||||
return this;
|
||||
}
|
||||
|
||||
public CDou add(double a)
|
||||
{
|
||||
number += a;
|
||||
circ();
|
||||
return this;
|
||||
}
|
||||
|
||||
public CDou sub(double a)
|
||||
{
|
||||
number -= a;
|
||||
circ();
|
||||
return this;
|
||||
}
|
||||
|
||||
public double get()
|
||||
{
|
||||
return number;
|
||||
}
|
||||
|
||||
public void circ()
|
||||
{
|
||||
if(number < 0)
|
||||
{
|
||||
number = max - (Math.abs(number) > max ? max : Math.abs(number));
|
||||
}
|
||||
|
||||
number = number % (max);
|
||||
}
|
||||
public class CDou {
|
||||
private double number;
|
||||
private final double max;
|
||||
|
||||
public CDou(double max) {
|
||||
number = 0;
|
||||
this.max = max;
|
||||
}
|
||||
|
||||
public CDou set(double n) {
|
||||
number = n;
|
||||
circ();
|
||||
return this;
|
||||
}
|
||||
|
||||
public CDou add(double a) {
|
||||
number += a;
|
||||
circ();
|
||||
return this;
|
||||
}
|
||||
|
||||
public CDou sub(double a) {
|
||||
number -= a;
|
||||
circ();
|
||||
return this;
|
||||
}
|
||||
|
||||
public double get() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void circ() {
|
||||
if (number < 0) {
|
||||
number = max - (Math.abs(number) > max ? max : Math.abs(number));
|
||||
}
|
||||
|
||||
number = number % (max);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user