Material Motion Exploring solutions that will empower creators with the tools needed to describe and implement rich, interactive motion on any platform. Edit this page · History
distanceFrom abs
Status Interface level Implementation level Library
Stable as of April 20, 2017 L2: Interaction creator L3: Stream creator material-motion
iOS (Swift) View View
upstream (number)
(number) downstream

abs specification

This is an alias for a hypothetical operator, abs.


abs emits the absolute value of a number. We recommend using distanceFrom(0) to achieve this result.

Example usage


upstream  |  downstream
 20       |  20
-1        |  1
-50       |  50