Created
February 16, 2016 00:30
-
-
Save flpms/5baff7b6f55a1cdf25c9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var fatorDesq; | |
| var rs = this.getField("rs").value; | |
| var rt = this.getField("rt").value; | |
| var st = this.getField("st").value; | |
| var valores = [rs, rt, st]; | |
| valores.sort(function(maior, menor) { | |
| if (maior > menor) return -1; | |
| if (maior < menor) return 1; | |
| if (maior === menor) return 0; | |
| }); | |
| fatorDesq = valores[0] - valores[valores.length -1] ; | |
| this.getField('fatorDesq'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment