TeamCode/src/main/java/org/firstinspires/ftc/teamcode/libraries/LineFollowLib.java
private static int threshFind(int[] ray){
        int min = 0;
        int max = 0;
        for(int i = 0; i < ray.length; i++){
            if(min > ray[i]) min = ray[i];
            else if(max < ray[i]) max = ray[i];
        }

        return (min + max) / 2;
    }
//takes a n array of bytes, and returns (min + max)/2 for a threshold
takes a n array of bytes, and returns (min + max)/2 for a threshold
takes a n array of bytes and returns ( min + max ) / 2 for a threshold
private static int threshFind(int[] ray){
        int min = 0;
        int max = 0;
        for(int i = 0; i < ray.length; i++){
            if(min > ray[i]) min = ray[i];
            else if(max < ray[i]) max = ray[i];
        }
        return (min + max) / 2;
    }
private static int threshFind ( int [ ] ray ) { int min = 0 ; int max = 0 ; for ( int i = 0 ; i < ray . length ; i ++ ) { if ( min > ray [ i ] ) min = ray [ i ] ; else if ( max < ray [ i ] ) max = ray [ i ] ; } return ( min + max ) / 2 ; }
takes a n array of bytes, and returns (min + max)/2 for a threshold
takes a n array of bytes and returns ( min + max ) / 2 for a threshold