Instantly share code, notes, and snippets.

@jenox /AppleProjection.swift Secret
Last active Jul 9, 2018

Embed
What would you like to do?
Projection as presented in the 2018 WWDC session Designing Fluid Interfaces: https://developer.apple.com/videos/play/wwdc2018/803/
// Distance travelled after decelerating to zero velocity at a constant rate
func project(initialVelocity: Float, decelerationRate: Float) -> Float {
return (initialVelocity / 1000.0) * decelerationRate / (1.0 - decelerationRate)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment