public PointD Offset(PointD point)
{
return new PointD(this.X + point.X, this.Y + point.Y);
}
PointD::Offset ( double x, double y ) : |
public static Line ProjectionLine(Puck p, Line reference) { PointD ij = reference.IntersectionWith(reference.Perpendicular(p.Location)); double dist = p.Location.DistanceTo(ij); double scale = p.Radius / dist; PointD projection_line_point = ij.Offset((p.Location.X - ij.X) * scale, (p.Location.Y - ij.Y) * scale); return(reference.Parallel(projection_line_point)); }