That makes sense, I wasn't aware that the function was supposed to take
multiple types.


On Wed, Jul 10, 2013 at 3:32 PM, Dan Bagnell <notifications@github.com>wrote:

> In Source/Core/PolylinePipeline.js:
>
> > +            throw new DeveloperError('positions is required.');
> > +        }
> > +
> > +        var length = positions.length;
> > +        if (length < 2) {
> > +            return positions.slice(0);
> > +        }
> > +
> > +        var cleanedPositions = [];
> > +        cleanedPositions.push(positions[0]);
> > +
> > +        for (var i = 1; i < length; ++i) {
> > +            var v0 = positions[i - 1];
> > +            var v1 = positions[i];
> > +
> > +            if (!v0.equals(v1)) {
>
> I changed this to Cartesian3.equals but now I see why it was done using
> the prototype function. Using a static function restricts the array to one
> type. Using the prototype function it will work for any type that has an
> equals method. I'm changing it back so it can be used for Cartographicsin
> WallGeometry.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/AnalyticalGraphicsInc/cesium/pull/911/files#r5124793>
> .
>