Beispiel #1
0
 @Override
 public HalBoolean eq(HalNumber n) {
   return new HalBoolean(toFloat().equals(n.toFloat()));
 }
Beispiel #2
0
 @Override
 public HalBoolean lt(HalNumber n) {
   return new HalBoolean(toFloat() < n.toFloat());
 }
Beispiel #3
0
 @Override
 public HalNumber div(HalNumber n) {
   return new HalFloat(toFloat() / n.toFloat());
 }
Beispiel #4
0
 @Override
 public HalNumber pow(HalNumber n) {
   return new HalFloat(Math.pow(toFloat(), n.toFloat()));
 }
Beispiel #5
0
 @Override
 public HalNumber mul(HalNumber n) {
   return new HalFloat(toFloat() * n.toFloat());
 }
Beispiel #6
0
 @Override
 public HalNumber sub(HalNumber n) {
   return new HalFloat(toFloat() - n.toFloat());
 }
Beispiel #7
0
 @Override
 public HalNumber add(HalNumber n) {
   return new HalFloat(toFloat() + n.toFloat());
 }