xxxxxxxxxx
37
let point;
function preload(){
point = loadJSON("./23-55.json");
}
function setup() {
createCanvas(400, 400);
let X = finder(point.a, 0);
let Y = finder(point.a, 1);
let Z = finder(point.a, 2);
console.log(X)
console.log(Y)
console.log(Z)
// console.log(point.a);
}
function draw() {
background(220);
}
function finder(arr, pos) {
let min = 1000;
let max = 0;
for (let i = 0; i < arr.length; i++){
if (arr[i][pos] > max){
max = arr[i][pos]
}
if (arr[i][pos] < min){
min = arr[i][pos]
}
}
return ({"max" : max, "min": min});
}