mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Fix Math.pow implementation in JS
This commit is contained in:
parent
485f8ac902
commit
c52b71292d
|
@ -25,8 +25,8 @@ public class MathNativeGenerator implements Generator {
|
||||||
@Override
|
@Override
|
||||||
public void generate(GeneratorContext context, SourceWriter writer, MethodReference methodRef) throws IOException {
|
public void generate(GeneratorContext context, SourceWriter writer, MethodReference methodRef) throws IOException {
|
||||||
String name = methodRef.getName();
|
String name = methodRef.getName();
|
||||||
if (name.equals("randomImpl")) {
|
if (name.endsWith("Impl")) {
|
||||||
name = "random";
|
name = name.substring(0, name.length() - 4);
|
||||||
}
|
}
|
||||||
function(context, writer, "Math." + name, methodRef.parameterCount());
|
function(context, writer, "Math." + name, methodRef.parameterCount());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user