Files
orx/orx-shapes/src/jvmTest/kotlin/Assertions.kt
2023-11-18 22:36:35 +01:00

9 lines
252 B
Kotlin

import io.kotest.matchers.doubles.plusOrMinus
import io.kotest.matchers.shouldBe
import org.openrndr.math.Vector2
infix fun Vector2.`should be near`(other: Vector2) {
x shouldBe other.x.plusOrMinus(1E-5)
y shouldBe other.y.plusOrMinus(1E-5)
}