build/modelscript.umd.js
function(obj) {
                if (obj.start && obj.end) { return this.contains(obj.start) && this.contains(obj.end); }
                var P = (obj.elements || obj).slice();
                if (P.length == 2) { P.push(0); }
                if (this.start.eql(P)) { return true; }
                var S = this.start.elements;
                var V = vector.create([S[0] - P[0], S[1] - P[1], S[2] - (P[2] || 0)]);
                var vect = this.toVector();
                return V.isAntiparallelTo(vect) && V.modulus() <= vect.modulus();
              }
function(obj) {
                if (obj.start && obj.end) { return this.contains(obj.start) && this.contains(obj.end); }
                var P = (obj.elements || obj).slice();
                if (P.length == 2) { P.push(0); }
                if (this.start.eql(P)) { return true; }
                var S = this.start.elements;
                var V = vector.create([S[0] - P[0], S[1] - P[1], S[2] - (P[2] || 0)]);
                var vect = this.toVector();
                return V.isAntiparallelTo(vect) && V.modulus() <= vect.modulus();
              }
function ( obj ) { if ( obj . start && obj . end ) { return this . contains ( obj . start ) && this . contains ( obj . end ) ; } var P = ( obj . elements || obj ) . slice ( ) ; if ( P . length == 2 ) { P . push ( 0 ) ; } if ( this . start . eql ( P ) ) { return true ; } var S = this . start . elements ; var V = vector . create ( [ S [ 0 ] - P [ 0 ] , S [ 1 ] - P [ 1 ] , S [ 2 ] - ( P [ 2 ] || 0 ) ] ) ; var vect = this . toVector ( ) ; return V . isAntiparallelTo ( vect ) && V . modulus ( ) <= vect . modulus ( ) ; }
Returns true iff the given point lies on the segment
Returns true iff the given point lies on the segment