Skip to content

Commit

Permalink
checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
LadyCailin committed Feb 1, 2024
1 parent e922b1b commit fe667f0
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/main/java/com/laytonsmith/core/functions/BasicLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -2753,23 +2753,24 @@ public FunctionSignatures getSignatures() {
public ExampleScript[] examples() throws ConfigCompileException {
return new ExampleScript[]{
new ExampleScript("Demonstrates why equals doesn't always work", """
@d1 = 0.8;
@d2 = 0;
for(@i = 0, @i < 8, @i++) {
@d1 = 0.8;
@d2 = 0;
for(@i = 0, @i < 8, @i++) {
@d2 += 0.1;
}
msg(@d1);
msg(@d2);
msg(@d1 == @d2);"""),
}
msg(@d1);
msg(@d2);
msg(@d1 == @d2);"""),
new ExampleScript("Same example, this time with a precision.", """
@d1 = 0.8;
@d2 = 0;
for(@i = 0, @i < 8, @i++) {
@d1 = 0.8;
@d2 = 0;
for(@i = 0, @i < 8, @i++) {
@d2 += 0.1;
}
msg(@d1);
msg(@d2);
msg(equals_epsilon(@d1, @d2, 0.0001));"""),};
}
msg(@d1);
msg(@d2);
msg(equals_epsilon(@d1, @d2, 0.0001));"""),
};
}

@Override
Expand Down

0 comments on commit fe667f0

Please sign in to comment.