BPY plus – the math module

A BPY plus module with useful math functions

Functions

clip(value, _min=0.0, _max=1.0)

Clip value by the _min … _max boundaries.

Parameters:

value: processing value

_min: the lower boundary

_max: the top boundary

Returns:

If the value goes beyond the boundaries – the value itself, and if not – the maximum possible boundary value.


range(value, min_src=0.0, max_src=1.0, min_dest=0.0, max_dest=1.0)

Converts the value from the min_src … max_src range to the min_dest .. .max_dest range

Parameters:

value: processing value

_min_src: the lower source range boundary

_max_src: the top source range boundary

_min_dest: the lower destination range boundary

_max_dest: the top destination range boundary

Returns:

The value in the new range.


0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments