Air_Hockey_Simulator.Physics.Line.Parallel C# (CSharp) Method

Parallel() public method

public Parallel ( PointD point ) : Line
point PointD
return Line
        public Line Parallel(PointD point)
        {
            return new Line(point, this.Slope);
        }

Usage Example

Exemplo n.º 1
0
        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));
        }
All Usage Examples Of Air_Hockey_Simulator.Physics.Line::Parallel