Coefficients transit and display on UI
This commit is contained in:
parent
78ce24f3f7
commit
b42016c74a
7 changed files with 64 additions and 20 deletions
|
@ -69,3 +69,15 @@ angular.module("FICApp")
|
|||
return (Math.round(res * 100) / 100) + " " + units[unit];
|
||||
}
|
||||
})
|
||||
|
||||
.filter("coeff", function() {
|
||||
return function(input) {
|
||||
if (input > 1) {
|
||||
return "+" + Math.floor((input - 1) * 100) + " %"
|
||||
} else if (input < 1) {
|
||||
return "-" + Math.floor((1 - input) * 100) + " %"
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Reference in a new issue