return getLengthTo(index) / this.getlength();
}
public Vec2D getPerpendicular(float percent) {
Vec2D vecBefore = null;
Vec2D vecAfter = null;
float offsetSearch = .01f;
if (percent - offsetSearch < 0)
vecBefore = this.getPos((percent));
else
vecBefore = this.getPos((percent - offsetSearch));
if (percent + offsetSearch > 1)
vecAfter = this.getPos((percent));
else
vecAfter = this.getPos((percent + offsetSearch));
if (vecAfter == null)
return null;
vecAfter = (Vec2D) vecAfter.sub(vecBefore);
vecAfter.normalize();
// SketchPoint newAn = vecAfter.getRotated((float)(Math.PI/2));
if (WoundClockwise())
vecAfter = vecAfter.rotate((float) Math.PI);
return vecAfter;
}