MCPcopy Index your code
hub / github.com/processing/p5.js / shrinkToDimension

Function shrinkToDimension

src/math/p5.Vector.js:26–30  ·  view source on GitHub ↗
(arr, dim)

Source from the content-addressed store, hash-verified

24 * In-place, shrinks an array to a dimension.
25 */
26const shrinkToDimension = function(arr, dim) {
27 while (arr.length > dim) {
28 arr.pop();
29 }
30}
31
32
33class Vector {

Callers 5

addMethod · 0.85
remMethod · 0.85
subMethod · 0.85
multMethod · 0.85
divMethod · 0.85

Calls 1

popMethod · 0.45

Tested by

no test coverage detected