public SphereVector WalkTowardsPortion(SphereVector v, double portion) { double distance = this.Distance(v); if (distance < 0.001) // currently has precision issues { return(new SphereVector(((1 - portion) * this + portion * v).Normalized())); } else { return(WalkTowards(v, this.Distance(v) * portion)); } }
internal SphereVector FlipOver(SphereVector v) { return(this.WalkTowards(v, 2 * this.Distance(v))); }
public double Distance(SphereVector v) { return(Math.Asin(this.Cross(v).Length())); }
public SphereVector WalkTowards(SphereVector v, double radians) { Vector3d D_tick = ((this.Cross(v).Cross(this)).Normalized()); // 90 degrees rotated towards v return(new SphereVector(Math.Cos(radians) * this + Math.Sin(radians) * D_tick)); }