Has anyone explored animating double precision flo...
# compose
s
Has anyone explored animating double precision floating point values in Compose? Seems like the animation API is entirely built around Float, which isn't precise enough for my use case (latitude and longitude). If I want to animate Double, how might I go about it? Separately, any tricks for animating rotating values via the shortest direction? Meaning animating 5 to 355 should go backwards through 0, not upwards through 180.
v
Instead of animating the value itself, angle, latitude, etc., you could map from an animated range to your own value range. E.g. consider the animated value of 0f to be 0.0 degrees latitude and 1f to be 90.0 degrees latitude.
s
That would still suffer from Float's limited precision, as all the animation math is still happening in Float. The end result is jittery movement of the animated point on a map