check the result by processing the slope by starting three points
$ slope1 = isSlopeGood ( $ arr [ 1 ] - $ arr [ 0 ] , $ arr , $ n ) ; $ slope2 = isSlopeGood ( $ arr [ 2 ] - $ arr [ 1 ] , $ arr , $ n ) ; $ slope3 = isSlopeGood ( ( int ) ( ( $ arr [ 2 ] - $ arr [ 0 ] ) / 2 ) , $ arr , $ n ) ; return ( $ slope1 $ slope2 $ slope3 ) ; }