LinearEquation
LinearEquation

Represents a linear equation (y = mx + b).

Functions
LinearEquation
LinearEquation()

Creates a default constructed LinearEquation object.  slope = 1.0, offset = 0.0, unit = unit_none

LinearEquation
LinearEquation(
float slope,
float offset
)

Creates a LinearEquation object.

Parameters
slope
float

The slope of the linear equation.

offset
float

The offset of the linear equation

Variables
m_slope
float m_slope

The slope of the linear equation (m in y=mx+b).

m_offset
float m_offset

The offset of the linear equation (b in y=mx+b).

Functions
slope
void slope(
float slope
)

Sets the of slope the linear equation.

Parameters
slope
float

The slope to set.

slope
float slope() const

Gets the slope of the linear equation.

Returns

The slope of the linear equation.

offset
void offset(
float offset
)

Sets the offset of the linear equation.

Parameters
offset
float

The offset to set.

offset
float offset() const

Gets the offset of the linear equation.

Returns

The offset of the linear equation.