public void add ( double x , double y ) { if ( count >= xarr . length ) { grow ( ) ; } xarr [ count ] = x ; yarr [ count ++ ] = y ; minX = Math . min ( minX , x ) ; minY = Math . min ( minY , y ) ; maxX = Math . max ( maxX , x ) ; maxY = Math . max ( maxY , y ) ; }
Adds sample and grows if necessary .