Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/processing/p5.js
/ findMin
Function
findMin
src/math/calculation.js:700–706 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
698
*/
699
fn.min =
function
(...args) {
700
const
findMin = arr => {
701
let
min = Infinity;
702
for
(
let
x of arr) {
703
min = Math.min(min, x);
704
}
705
return
min;
706
};
707
708
if
(args[0] instanceof Array) {
709
return
findMin(args[0]);
Callers
1
calculation
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected