diff options
| author | gingerBill <bill@gingerbill.org> | 2020-03-05 20:34:30 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-03-05 20:34:30 +0000 |
| commit | e92fdb4a99bf9d27009dd35fdd074ff14facfc03 (patch) | |
| tree | e74c13d12da216f2548db0a8359e491263dc6acd /core/time | |
| parent | 2fe0eaf2adf952867d4ce4fba53b4b3ac75e1ba5 (diff) | |
`x if cond else y` and `x when cond else y` expressions
Diffstat (limited to 'core/time')
| -rw-r--r-- | core/time/time.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/time/time.odin b/core/time/time.odin index 51c77a468..93fa7f8b3 100644 --- a/core/time/time.odin +++ b/core/time/time.odin @@ -92,7 +92,7 @@ duration_round :: proc(d, m: Duration) -> Duration { return MAX_DURATION; } duration_truncate :: proc(d, m: Duration) -> Duration { - return m <= 0 ? d : d - d%m; + return d if m <= 0 else d - d%m; } |