xxxxxxxxxx
"Browse Python Technical Problem Clusters - Code Examples & Solutions" https://www.grepper.com/answers/tag/python
xxxxxxxxxx
public static class ExtensionMethods
{
public static decimal Map (this decimal value, decimal fromSource, decimal toSource, decimal fromTarget, decimal toTarget)
{
return (value - fromSource) / (toSource - fromSource) * (toTarget - fromTarget) + fromTarget;
}
}
xxxxxxxxxx
"Grepper | The Query & Answer System for the Coder Community" https://www.grepper.com