Fix Math.pow implementation in JS

This commit is contained in:
Alexey Andreev 2022-11-11 09:15:52 +01:00
parent 485f8ac902
commit c52b71292d

View File

@ -25,8 +25,8 @@ public class MathNativeGenerator implements Generator {
@Override
public void generate(GeneratorContext context, SourceWriter writer, MethodReference methodRef) throws IOException {
String name = methodRef.getName();
if (name.equals("randomImpl")) {
name = "random";
if (name.endsWith("Impl")) {
name = name.substring(0, name.length() - 4);
}
function(context, writer, "Math." + name, methodRef.parameterCount());
}