MCPcopy
hub / github.com/KilledByAPixel/LittleJS / isVector2

Function isVector2

src/engineMath.js:596–596  ·  view source on GitHub ↗

* Check if object is a valid Vector2 * @param {any} v * @return {boolean} * @memberof Math

(v)

Source from the content-addressed store, hash-verified

594 * @return {boolean}
595 * @memberof Math */
596function isVector2(v) { return v instanceof Vector2 && v.isValid(); }
597
598// vector2 asserts
599function ASSERT_VECTOR2_VALID(v) { ASSERT(isVector2(v), 'Vector2 is invalid.', v); }

Callers 15

util.test.mjsFile · 0.90
debugRectFunction · 0.85
debugPolyFunction · 0.85
debugCircleFunction · 0.85
debugLineFunction · 0.85
debugOverlapFunction · 0.85
debugTextFunction · 0.85
tileFunction · 0.85
drawTileFunction · 0.85
drawRectGradientFunction · 0.85
drawTextureWrappedFunction · 0.85
drawLineListFunction · 0.85

Calls 1

isValidMethod · 0.45

Tested by

no test coverage detected