Skip to content

Commit

Permalink
Without redundant parenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallisto committed Apr 27, 2024
1 parent 4486007 commit 2170ddb
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,12 @@ object Geometry extends Accuracy:
def minus(that: Point): Point =
Point(this.x - that.x, this.y - that.y)

private def rotate(theta: Radian): Point = {
private def rotate(theta: Radian): Point =
val cot: Double =
Math.cos(theta.toDouble)
val sit: Double =
Math.sin(theta.toDouble)
Point(x * cot - y * sit, x * sit + y * cot)
}

/** Tests whether this `Point` is approximately equal to another, within a given accuracy. */
def almostEquals(that: Point, accuracy: Double = ACCURACY): Boolean =
Expand Down

0 comments on commit 2170ddb

Please sign in to comment.