Created
October 10, 2018 20:12
-
-
Save phillro/08f0976ce4fddc8889c6910f14b6a487 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function scalingBidModifier { | |
maxScaleFactor = .4 | |
rootScaleValue = $25 | |
scalingFloor = $5 | |
If(bid>scalingFloor){ | |
var modifier = if(bid>=rootScaleValue){ | |
1-maxScaleFactor | |
} else { | |
1-((bid/rootScaleValue)*maxScaleFactor) | |
} | |
(modifier * bid) > scalingFloor ? (modifier * bid) : bid | |
}else{ | |
bid | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment