Created
May 17, 2017 19:03
-
-
Save ParthBarot-BoTreeConsulting/4811c4b9dba2acaf035d2bda1a6cbf24 to your computer and use it in GitHub Desktop.
JS refactoring - Pseudo code
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
DEFINE amount, fixedVal, myDataVal | |
IF RANGE(0 - 12) INCLUDES myDataVal | |
IF RANGE(0,12000) INCLUDES amount | |
IF RANGE(0,95) INCLUDES calculatedVal | |
RETURN 0.8 | |
ELSEIF RANGE(95,*) INCLUDES calculatedVal | |
RETURN 0.7 | |
ENDIF | |
ELSE | |
IF RANGE(0,95) INCLUDES calculatedVal | |
RETURN 1.0 | |
ELSEIF RANGE(95,*) INCLUDES calculatedVal | |
RETURN 1.1 | |
ENDIF | |
ENDIF | |
ELSEIF RANGE(12,*) INCLUDES myDataVal | |
IF RANGE(0,12000) INCLUDES amount | |
IF RANGE(0,90) INCLUDES calculatedVal | |
RETURN 0.4 | |
ELSEIF RANGE(90,*) INCLUDES calculatedVal | |
RETURN 0.7 | |
ENDIF | |
ELSE | |
IF RANGE(0,78) INCLUDES calculatedVal | |
RETURN 0.4 | |
ELSEIF RANGE(78,90) INCLUDES calculatedVal | |
RETURN 0.7 | |
ELSEIF RANGE(90,*) INCLUDES calculatedVal | |
RETURN 0.9 | |
ENDIF | |
ENDIF | |
ENDIF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment