MCPcopy Create free account
hub / github.com/microsoft/SandDance / toDoublePrecisionArray

Function toDoublePrecisionArray

docs/app/js/sanddance-app.js:82624–82643  ·  view source on GitHub ↗
(typedArray, _ref3)

Source from the content-addressed store, hash-verified

82622}
82623var scratchArray;
82624function toDoublePrecisionArray(typedArray, _ref3) {
82625 var _ref3$size = _ref3.size, size = _ref3$size === void 0 ? 1 : _ref3$size, _ref3$startIndex = _ref3.startIndex, startIndex = _ref3$startIndex === void 0 ? 0 : _ref3$startIndex, endIndex = _ref3.endIndex;
82626 if (!Number.isFinite(endIndex)) endIndex = typedArray.length;
82627 var count = (endIndex - startIndex) / size;
82628 scratchArray = (0, _typedArrayManagerDefault.default).allocate(scratchArray, count, {
82629 type: Float32Array,
82630 size: size * 2
82631 });
82632 var sourceIndex = startIndex;
82633 var targetIndex = 0;
82634 while(sourceIndex < endIndex){
82635 for(var j = 0; j < size; j++){
82636 var value = typedArray[sourceIndex++];
82637 scratchArray[targetIndex + j] = value;
82638 scratchArray[targetIndex + j + size] = fp64LowPart(value);
82639 }
82640 targetIndex += size * 2;
82641 }
82642 return scratchArray.subarray(0, count * size * 2);
82643}
82644
82645},{"./typed-array-manager":"4DbDw","math.gl":"huJnq","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"4DbDw":[function(require,module,exports) {
82646var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");

Callers

nothing calls this directly

Calls 1

fp64LowPartFunction · 0.70

Tested by

no test coverage detected