Last active
December 19, 2015 04:19
-
-
Save calvinmetcalf/5896643 to your computer and use it in GitHub Desktop.
another example
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 findC(array){ | |
return array.filter(function(a){ | |
return Array.isArray(a) && a.length === 2; | |
}).map(function(a){ | |
//x*x is much faster then Math.pow(a,2); | |
return Math.sqrt(a[0]*a[0]+a[1]*a[1]); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment