Skip to content

Commit

Permalink
Remove default argument values from scale_ functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ideoforms committed Aug 9, 2024
1 parent 8c7e40e commit 85df71a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions isobar/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ def frequency_ratio_to_midi_semitones(frequency_ratio) -> float:
return math.log2(frequency_ratio) * 12

def scale_lin_exp(value: float,
from_min: float = 0,
from_max: float = 1,
to_min: float = 1,
to_max: float = 10) -> float:
from_min: float,
from_max: float,
to_min: float,
to_max: float) -> float:
"""
Map a value on a linear scale to an exponential scale.
Expand All @@ -178,10 +178,10 @@ def scale_lin_exp(value: float,
return ((to_max / to_min) ** ((value - from_min) / (from_max - from_min))) * to_min

def scale_lin_lin(value: float,
from_min: float = 0,
from_max: float = 1,
to_min: float = 0,
to_max: float = 1) -> float:
from_min: float,
from_max: float,
to_min: float,
to_max: float) -> float:
"""
Map a value on a linear scale to a linear scale.
Expand Down

0 comments on commit 85df71a

Please sign in to comment.