Skip to content

Commit

Permalink
Bump to 1.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
connorslade committed Mar 14, 2023
1 parent d3e477f commit 5934243
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {

// what should the group-id be breon
group 'paintingcanvas'
version '1.3.4'
version '1.3.5'

repositories {}
dependencies {}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/paintingcanvas/misc/Misc.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public static <N extends Number> N clamp(N min, N val, N max) {
}

public static <N extends Number> boolean equality(N a, N b, N error) {
return Math.max(a.doubleValue(), b.doubleValue()) - error.doubleValue() <= Math.min(a.doubleValue(), b.doubleValue()) + error.doubleValue();
var err = error.doubleValue() / 2;
return Math.max(a.doubleValue(), b.doubleValue()) - err <= Math.min(a.doubleValue(), b.doubleValue()) + err;
}
}

0 comments on commit 5934243

Please sign in to comment.