MCPcopy
hub / github.com/CesiumGS/cesium / fromElements

Method fromElements

packages/engine/Source/Core/Cartesian2.js:48–56  ·  view source on GitHub ↗

* Creates a Cartesian2 instance from x and y coordinates. * * @param {number} x The x coordinate. * @param {number} y The y coordinate. * @param {Cartesian2} [result] The object onto which to store the result. * @returns {Cartesian2} The modified result parameter or a new Cartesian2 i

(x, y, result)

Source from the content-addressed store, hash-verified

46 * @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
47 */
48 static fromElements(x, y, result) {
49 if (!defined(result)) {
50 return new Cartesian2(x, y);
51 }
52
53 result.x = x;
54 result.y = y;
55 return result;
56 }
57
58 /**
59 * Duplicates a Cartesian2 instance.

Callers 15

UniformState.jsFile · 0.45
I3SGeometry.jsFile · 0.45
VoxelBoxShape.jsFile · 0.45
getBoxChunkObbFunction · 0.45
updateHeightsFunction · 0.45
Picking.jsFile · 0.45
transformPlaneFunction · 0.45
getCylinderShapeFunction · 0.45

Calls 1

definedFunction · 0.70

Tested by

no test coverage detected