olsonk / pyRosita

0 stars 0 forks source link

Add helper function for change_ methods #7

Closed olsonk closed 6 years ago

olsonk commented 6 years ago

Code often checks whether the given change amounts would set the attribute beyond the max/min values. Create a helper function that can check for this situation and modify the attribute accordingly.

olsonk commented 6 years ago

Added helper function that guarantees that requested "change" amounts are within allowable limits. Function provides useful feedback when outside of allowable bounds - requested value, max/min allowed, and what it is being set to. See this commit.