Files
orx/orx-shapes/src/test/kotlin/Assertions.kt
2020-03-24 19:35:06 +01:00

8 lines
253 B
Kotlin

import org.amshove.kluent.shouldBeInRange
import org.openrndr.math.Vector2
infix fun Vector2.`should be near`(other: Vector2) {
x shouldBeInRange (other.x - 0.00001..other.x + 0.00001)
y shouldBeInRange (other.y - 0.00001..other.y + 0.00001)
}