MCPcopy Create free account
hub / github.com/angular/components / getSlope

Function getSlope

src/cdk/menu/menu.spec.ts:93–95  ·  view source on GitHub ↗

Calculate the slope between two points.

(from: Point, to: Point)

Source from the content-addressed store, hash-verified

91
92 /** Calculate the slope between two points. */
93 function getSlope(from: Point, to: Point) {
94 return (to.y - from.y) / (to.x - from.x);
95 }
96
97 /** Calculate the y intercept based on some slope and point. */
98 function getYIntercept(slope: number, point: Point) {

Callers 1

getNextPointIteratorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected