Accord.NET Framework

## LineFromSlopeIntercept Method |

Creates a Line with the specified slope and intercept.

Syntax

Request Example
View Source#### Parameters

#### Return Value

Type: Line

Returns a Line representing the specified line.

- 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.

Returns 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