Skip to content

Commit

Permalink
add squaring method
Browse files Browse the repository at this point in the history
  • Loading branch information
rhames07 committed Mar 10, 2022
1 parent 7821c25 commit 19b7502
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.rhames07</groupId>
<artifactId>arithmetic</artifactId>
<version>1.0.4-SNAPSHOT</version>
<version>1.0.5-SNAPSHOT</version>
<build>
<plugins>
<plugin>
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/io/github/rhames07/arithmetic/Operation.java
Expand Up @@ -22,4 +22,8 @@ public static BigDecimal multiply(BigDecimal x, BigDecimal y) {
public static BigDecimal divide(BigDecimal x, BigDecimal y) {
return x.divide(y, RoundingMode.UNNECESSARY);
}

public static BigDecimal squaring(BigDecimal x) {
return x.multiply(x);
}
}

0 comments on commit 19b7502

Please sign in to comment.