Skip to content

Commit 029c665

Browse files
authored
Fix TransitionController require conditions (#141)
1 parent cae2a9c commit 029c665

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tiamat/src/commonMain/kotlin/com/composegears/tiamat/TransitionController.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public class TransitionController(
2222
internal val updates: StateFlow<Event> = _updates.asStateFlow()
2323

2424
init {
25-
require(start >= end) { "`start`($start) value should be smaller then `end`($end)" }
26-
require(start !in 0f..1f) { "`start`($start) value should be in range 0..1" }
27-
require(end !in 0f..1f) { "`end`($end) value should be in range 0..1" }
25+
require(start <= end) { "`start`($start) value should be less than or equal to `end`($end)" }
26+
require(start in 0f..1f) { "`start`($start) value should be in range 0..1" }
27+
require(end in 0f..1f) { "`end`($end) value should be in range 0..1" }
2828
}
2929

3030
private fun ensureActive() {

0 commit comments

Comments
 (0)