AForge.Math.Geometry.Line.FromSlopeIntercept C# (CSharp) Method

FromSlopeIntercept() public static method

Creates a Line with the specified slope and intercept.

The construction here follows the same rules as for the rest of this class. Most lines are expressed as y = slope * x + intercept. Vertical lines, however, are x = intercept. This is indicated by IsVertical being true or by Slope returning float.PositiveInfinity or float.NegativeInfinity.

public static FromSlopeIntercept ( float slope, float intercept ) : Line
slope float The slope of the line
intercept float The Y-intercept of the line, unless the slope is an /// infinity, in which case the line's equation is "x = intercept" instead.
return Line
		public static Line FromSlopeIntercept( float slope, float intercept )
		{
			return new Line( slope, intercept );
		}