OffsetResistanceExtension extension

Provides withResistance method to apply drag resistance to an Offset.

on

Methods

withResistance(double resistance) → Offset

Available on Offset, provided by the OffsetResistanceExtension extension

Returns a new Offset with a given resistance applied, which will hold it back the further it deviates from Offset.zero.