tqec.templates.scale.LinearFunction
- class LinearFunction(slope: float = 1.0, offset: float = 0.0)[source]
Represents a linear function.
A linear function is fully described with a slope and an offset.
- __init__(slope: float = 1.0, offset: float = 0.0) None
Methods
__init__
([slope, offset])intersection
(other)Compute the intersection between two linear functions.
Attributes
offset
slope