diff --git a/src/main/java/com/laytonsmith/core/functions/BasicLogic.java b/src/main/java/com/laytonsmith/core/functions/BasicLogic.java index 5dc54e760..064028027 100644 --- a/src/main/java/com/laytonsmith/core/functions/BasicLogic.java +++ b/src/main/java/com/laytonsmith/core/functions/BasicLogic.java @@ -2706,8 +2706,8 @@ public Boolean runAsync() { @Override public Mixed exec(Target t, Environment env, Mixed... args) throws ConfigRuntimeException { - double d1 = ArgumentValidation.getDouble(args[0], t); - double d2 = ArgumentValidation.getDouble(args[1], t); + double d1 = ArgumentValidation.getNumber(args[0], t); + double d2 = ArgumentValidation.getNumber(args[1], t); double epsilon = ArgumentValidation.getDouble(args[2], t); return CBoolean.get(java.lang.Math.abs(d1 - d2) < epsilon); } @@ -2724,7 +2724,7 @@ public Integer[] numArgs() { @Override public String docs() { - return "boolean {double d1, double d2, double epsilon}" + return "boolean {double d1, number d2, double epsilon | number d1, double d2, double epsilon}" + " When comparing the equality of floating point numbers, it is often impossible to directly" + " compare via == (equals) since two floating point numbers that might be actually semantically" + " equivalent, are represented slightly differently in the computer, thus making them not actually" @@ -2742,10 +2742,16 @@ public Version since() { @Override public FunctionSignatures getSignatures() { return new SignatureBuilder(CBoolean.TYPE) - .param(CDouble.TYPE, "d1", "The first double to compare.") + .param(CNumber.TYPE, "d1", "The first number to compare.") .param(CDouble.TYPE, "d2", "The second double to compare.") .param(CDouble.TYPE, "epsilon", "The degree of difference to use to determine equality, for instance 0.00001") + .newSignature(CBoolean.TYPE) + .param(CDouble.TYPE, "d1", "The first double to compare.") + .param(CNumber.TYPE, "d2", "The second number to compare.") + .param(CDouble.TYPE, "epsilon", + "The degree of difference to use to determine equality, for instance 0.00001") + .build(); } diff --git a/src/main/resources/samp_main.txt b/src/main/resources/samp_main.txt index 783ef5c26..cf1f59b3d 100644 --- a/src/main/resources/samp_main.txt +++ b/src/main/resources/samp_main.txt @@ -12,7 +12,9 @@ @server_name = ''; # Echo out a server greeting to the console -console('Welcome to this server, which is running CommandHelper! (Change this message in plugins/CommandHelper/main.ms)'); +console('CommandHelper successfully installed! To get started, visit https://methodscript.com, and visit the learning' + . ' trail at the bottom, and particularly the Beginner's and Advanced Guides.' + . ' (Change this message in plugins/CommandHelper/main.ms)'); # Bind an event to the player join, and tell ops hello. # We send in @server_name, so we can use it inside the event handler