computer-graphics/lecture06-task01-cohen-sutherland-algorithm.js
//returns true if the point is inside with respect to a particular edge
returns true if the point is inside with respect to a particular edge
returns true if the point is inside with respect to a particular edge
function isInside(point, orientation) {
        x = point[0];
        y = point[1];
        if (orientation == 'left') {
            if (x > xmin)
                return true;
            else
                return false;
        }
        else if (orientation == 'top') {
            if (y > ymin)
                return true;
            else
                return false;
        }
        else if (orientation == 'right') {
            if (x < xmax)
                return true;
            else
                return false;
        }
        else if (orientation == 'down') {
            if (y < ymax)
                return true;
            else
                return false;
        }
    }
function isInside ( point , orientation ) { x = point [ 0 ] ; y = point [ 1 ] ; if ( orientation == 'left' ) { if ( x > xmin ) return true ; else return false ; } else if ( orientation == 'top' ) { if ( y > ymin ) return true ; else return false ; } else if ( orientation == 'right' ) { if ( x < xmax ) return true ; else return false ; } else if ( orientation == 'down' ) { if ( y < ymax ) return true ; else return false ; } }
returns true if the point is inside with respect to a particular edge
returns true if the point is inside with respect to a particular edge