hgeometry-kernel
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageGHC2024

HGeometry.Line.NonVertical.Class

Description

A class representing non-vertical lines.

Synopsis

Documentation

type NVLine2_ line r = (Line_ line 2 r, NonVerticalHyperPlane_ line 2 r) Source #

Typeclass modelling Non-vertical lines

pattern NVLine2_ :: NonVerticalHyperPlane_ line 2 r => r -> r -> line Source #

Match on a non-vertical line

slope :: NonVerticalHyperPlane_ line 2 r => Lens' line r Source #

Lens to access the slope of a line

>>> (LineEQ 10 20) ^. slope
10

intercept :: NonVerticalHyperPlane_ line 2 r => Lens' line r Source #

Lens to access the intercept (i.e. the value at which it intersects the y-axis) of a line.

>>> (LineEQ 10 20) ^. intercept
20