MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / evalFloat

Method evalFloat

src/main/java/net/optifine/expr/FunctionType.java:126–265  ·  view source on GitHub ↗
(IExpression[] args)

Source from the content-addressed store, hash-verified

124 }
125
126 public float evalFloat(IExpression[] args)
127 {
128 switch (this)
129 {
130 case PLUS:
131 return evalFloat(args, 0) + evalFloat(args, 1);
132
133 case MINUS:
134 return evalFloat(args, 0) - evalFloat(args, 1);
135
136 case MUL:
137 return evalFloat(args, 0) * evalFloat(args, 1);
138
139 case DIV:
140 return evalFloat(args, 0) / evalFloat(args, 1);
141
142 case MOD:
143 float f = evalFloat(args, 0);
144 float f1 = evalFloat(args, 1);
145 return f - f1 * (float)((int)(f / f1));
146
147 case NEG:
148 return -evalFloat(args, 0);
149
150 case PI:
151 return MathHelper.PI;
152
153 case SIN:
154 return MathHelper.sin(evalFloat(args, 0));
155
156 case COS:
157 return MathHelper.cos(evalFloat(args, 0));
158
159 case ASIN:
160 return MathUtils.asin(evalFloat(args, 0));
161
162 case ACOS:
163 return MathUtils.acos(evalFloat(args, 0));
164
165 case TAN:
166 return (float)Math.tan((double)evalFloat(args, 0));
167
168 case ATAN:
169 return (float)Math.atan((double)evalFloat(args, 0));
170
171 case ATAN2:
172 return (float)MathHelper.func_181159_b((double)evalFloat(args, 0), (double)evalFloat(args, 1));
173
174 case TORAD:
175 return MathUtils.toRad(evalFloat(args, 0));
176
177 case TODEG:
178 return MathUtils.toDeg(evalFloat(args, 0));
179
180 case MIN:
181 return this.getMin(args);
182
183 case MAX:

Callers 4

getMinMethod · 0.95
getMaxMethod · 0.95
evalBoolMethod · 0.95
evalFloatArrayMethod · 0.95

Calls 15

sinMethod · 0.95
cosMethod · 0.95
asinMethod · 0.95
acosMethod · 0.95
func_181159_bMethod · 0.95
toRadMethod · 0.95
toDegMethod · 0.95
getMinMethod · 0.95
getMaxMethod · 0.95
clamp_floatMethod · 0.95
absMethod · 0.95
floor_floatMethod · 0.95

Tested by

no test coverage detected