Skip to content

Commit 33f3106

Browse files
committed
Do not use Math in common code.
1 parent 66abea1 commit 33f3106

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/stdlib/test/collections/ArraysTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ class ArraysTest {
356356
expect(1, { byteArrayOf(1, 3, 2).minBy { it * it } })
357357
expect(3, { shortArrayOf(3, 2).minBy { "a" } })
358358
expect(2.0F, { floatArrayOf(3.0F, 2.0F).minBy { it.toString() } })
359-
expect(2.0, { doubleArrayOf(2.0, 3.0).minBy { Math.sqrt(it) } })
359+
expect(2.0, { doubleArrayOf(2.0, 3.0).minBy { it * it } })
360360
}
361361

362362
@Test fun maxBy() {
@@ -375,7 +375,7 @@ class ArraysTest {
375375
expect(3, { byteArrayOf(1, 3, 2).maxBy { it * it } })
376376
expect(3, { shortArrayOf(3, 2).maxBy { "a" } })
377377
expect(3.0F, { floatArrayOf(3.0F, 2.0F).maxBy { it.toString() } })
378-
expect(3.0, { doubleArrayOf(2.0, 3.0).maxBy { Math.sqrt(it) } })
378+
expect(3.0, { doubleArrayOf(2.0, 3.0).maxBy { it * it } })
379379
}
380380

381381
@Test fun minIndex() {

0 commit comments

Comments
 (0)