It won't matter when we change the function, but this array allocation is considered too expensive, especially with respect to building GC pressure.  Instead, we would allocate `_scaleByDistance` in the constructor, as you already do, and just set the elements.  This is really important for a hot function like `setPosition`, but I can imagine naive code that calls this function over and over again even though it doesn't need to.