From e9a052c53535f0e18eb7c66e98c4667800fe75ba Mon Sep 17 00:00:00 2001 From: pixelzoom Date: Wed, 4 Oct 2023 15:52:15 -0600 Subject: [PATCH] document scratchVector, https://github.com/phetsims/my-solar-system/issues/217 --- js/common/model/NumericalEngine.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/common/model/NumericalEngine.ts b/js/common/model/NumericalEngine.ts index 75498cce..8435a871 100644 --- a/js/common/model/NumericalEngine.ts +++ b/js/common/model/NumericalEngine.ts @@ -16,6 +16,8 @@ import { ObservableArray } from '../../../../axon/js/createObservableArray.js'; import Body from '../../../../solar-system-common/js/model/Body.js'; import Engine from '../../../../solar-system-common/js/model/Engine.js'; +// Used when we want to avoid modifying a Vector (position, velocity, acceleration), +// and want to avoid allocating a new Vector copy. const scratchVector = new Vector2( 0, 0 ); // constants for PEFRL algorithm