MCPcopy
hub / github.com/angular/components / getNextPointIterator

Function getNextPointIterator

src/cdk/menu/menu.spec.ts:221–232  ·  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

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

Callers 1

hoverFunction · 0.85

Calls 2

getSlopeFunction · 0.70
getYInterceptFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…