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

Function getNextPointIterator

src/cdk/menu/menu.spec.ts:222–233  ·  view source on GitHub ↗

* Get a function which determines the next point to generate when moving from one point to * another.

(from: Point, to: Point)

Source from the content-addressed store, hash-verified

220 * another.
221 */
222 function getNextPointIterator(from: Point, to: Point) {
223 let x = from.x;
224 const m = getSlope(from, to);
225 const b = getYIntercept(m, to);
226 return () => {
227 if (x > to.x) {
228 return null;
229 }
230 const y = m * x + b;
231 return {x: Math.floor(x++), y: Math.floor(y)};
232 };
233 }
234
235 it('should close the edit menu when hovering directly down from the edit menu trigger to the print item without waiting', async () => {
236 openFileMenu();

Callers 1

hoverFunction · 0.85

Calls 2

getSlopeFunction · 0.70
getYInterceptFunction · 0.70

Tested by

no test coverage detected