Skip to content

Commit 421e241

Browse files
committed
Fixed sonar issue
1 parent cba9dd5 commit 421e241

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44

55
// project meta data
66
group 'de.havox_design.aoc2023'
7-
version '0.18.0'
7+
version '0.18.1'
88

99
// Switch to gradle "all" distribution.
1010
wrapper {

day18/src/main/kotlin/de/havox_design/aoc2023/day18/Day18.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class Day18(private var filename: String) {
8686

8787
private fun List<Coordinate>.polygonArea(): Double =
8888
abs((1..<size)
89-
.sumOf { it -> crossProduct(get(it), get(it - 1)) } / 2.0)
89+
.sumOf { value -> crossProduct(get(value), get(value - 1)) } / 2.0)
9090

9191
private fun crossProduct(a: Coordinate, b: Coordinate) =
9292
a.x.toLong() * b.y.toLong() - b.x.toLong() * a.y.toLong()

0 commit comments

Comments
 (0)