TemporalActions don't always end on ending value
See original GitHub issueDue to floating point arithmetic, TemporalAction
s that have an end
argument aren’t guaranteed to end on that state.
Arbitrary example (Kotlin):
val action = ColorAction()
action.color = Color(0xffffffff.toInt())
action.duration = 1f
action.interpolation = Interpolation.pow5Out
action.endColor = Color(0x444444ff)
After execution, I would expect the actor’s color to be 0x444444ff; however, it’s 0x434343ff.
Would it make sense override end
and do the equivalent of color.set(endColor)
for all affected actions?
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (9 by maintainers)
Top Results From Across the Web
Workflows | Temporal Documentation
There are three possible values: Abandon: the Child Workflow Execution is not affected. Request Cancel: a Cancellation request is sent to the Child...
Read more >Actions and Events in Interval Temporal Logic
We present a representation of events and action based on interval ... effects become true at the end of the event and remain...
Read more >The Temporal Logic of Actions - Leslie Lamport
A temporal formula is built from elementary formulas using boolean operators and the unary operator ✷ (read always). For example, if E1 and...
Read more >The Temporal Logic of Actions - Microsoft
A temporal formula is built from elementary formulas using boolean operators and the unary operator ✷ (read always). For example, if E1 and...
Read more >Self-maintaining, Contiguous Effective Dates in Temporal Tables
This is because the 'effective end date' is implied by the effective date on the subsequent row, and the current price is always...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Need to be careful as the action may be reversed in which case the final color on action complete is the start color. I think it’s safer to deal with this inside the
update
for the special case wherepercentage == 1f
.@NathanSweet My comment was more oriented to the fact that start and end Color should be either both Colors instances or both be stored as their float components more than about the necessity of exposing the getter for the start color (haven’t suggested having a setter). After some more thought, I think the argument for minimal memory allocation outweights the benefits of using Color instances and, imo, end Color should also be stored as its float components (maybe lazily created if
getEndColor()
is called)