cgp.runtime
Class NumberType
java.lang.Object
|
+--cgp.runtime.Type
|
+--cgp.runtime.NumberType
- public class NumberType
- extends Type
Field Summary |
private double |
value
|
Methods inherited from class cgp.runtime.Type |
andOp,
getAttr,
getKBStack,
getNthOp,
getScopeStack,
getType,
invokeMemberFunc,
isOp,
notOp,
operationError,
orOp,
setAttr,
setKBStack,
setNthOp,
setScopeStack,
setType |
Methods inherited from class java.lang.Object |
,
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
value
private double value
NumberType
public NumberType(double n)
getValue
public double getValue()
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
equals
public boolean equals(java.lang.Object other)
- Overrides:
- equals in class java.lang.Object
gtOp
public Type gtOp(Type other)
- Overrides:
- gtOp in class Type
ltOp
public Type ltOp(Type other)
- Overrides:
- ltOp in class Type
geOp
public Type geOp(Type other)
- Overrides:
- geOp in class Type
leOp
public Type leOp(Type other)
- Overrides:
- leOp in class Type
eqOp
public Type eqOp(Type other)
- Overrides:
- eqOp in class Type
neOp
public Type neOp(Type other)
- Overrides:
- neOp in class Type
addOp
public Type addOp(Type other)
- Arithmetic addition.
- Overrides:
- addOp in class Type
subtractOp
public Type subtractOp(Type other)
- Overrides:
- subtractOp in class Type
multiplyOp
public Type multiplyOp(Type other)
- Overrides:
- multiplyOp in class Type
divideOp
public Type divideOp(Type other)
- Overrides:
- divideOp in class Type
modulusOp
public Type modulusOp(Type other)
- Overrides:
- modulusOp in class Type
negateOp
public Type negateOp()
- Overrides:
- negateOp in class Type
pow
public NumberType pow(NumberType exponent)
- pCG member functions.
"// **" indicates that this value is mutated.
sqrt
public NumberType sqrt()
sin
public NumberType sin()
cos
public NumberType cos()
tan
public NumberType tan()
floor
public NumberType floor()
ceil
public NumberType ceil()
round
public NumberType round()
inc
public NumberType inc()
dec
public NumberType dec()
chr
public StringType chr()
- Return a string which this number represents as ASCII.