|
LineFromSlopeIntercept Method
|
Creates a
Line with the specified slope and intercept.
Namespace:
Accord.Math.Geometry
Assembly:
Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax public static Line FromSlopeIntercept(
float slope,
float intercept
)
Public Shared Function FromSlopeIntercept (
slope As Single,
intercept As Single
) As Line
Request Example
View SourceParameters
- slope
- Type: SystemSingle
The slope of the line - intercept
- Type: SystemSingle
The Y-intercept of the line, unless the slope is an
infinity, in which case the line's equation is "x = intercept" instead.
Return Value
Type:
LineReturns a
Line representing the specified line.
Remarks 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 PositiveInfinity or
NegativeInfinity.
See Also