English question: Is there a word for interpolate,...
# random
r
English question: Is there a word for interpolate, but the opposite direction? For example, say I have
min
and
max
, I can get
value = interpolate(from = min, to = max, ratio = 50%)
. But say I have another function
anti-interpolate
that, given a
min
,
max
, and
value
, it tells me what the
ratio
is that
value
is between
min
and
max
.
d
ratio?
r
Are you asking what ratio is or suggesting it as a name?
d
Suggesting as a name.
r
It's not a particularly descriptive name. If you see a function called
interpolate
, you have a reasonable idea of what it is doing. If you see a function called
ratio
, not so much.
e
getRatio
?
minMaxRatio
rangeRatio
n
I don't think there is a equivalent English word, however the nearest match would be deconstruct/decompose.
r
I was afraid of that. Thanks for all the suggestions everyone.
h
I used “deinteroplate” in my lib
The “de” prefix sometimes means opposite, for example deconstructing is the opposite of constructing, forestation vs deforestation, etc
r
That does sound better than uninterpolate.
u
fraction?