MCPcopy
hub / github.com/mrdoob/three.js / random

Method random

src/math/Vector3.js:1219–1227  ·  view source on GitHub ↗

* Sets each component of this vector to a pseudo-random value between `0` and * `1`, excluding `1`. * * @return {Vector3} A reference to this vector.

()

Source from the content-addressed store, hash-verified

1217 * @return {Vector3} A reference to this vector.
1218 */
1219 random() {
1220
1221 this.x = Math.random();
1222 this.y = Math.random();
1223 this.z = Math.random();
1224
1225 return this;
1226
1227 }
1228
1229 /**
1230 * Sets this vector to a uniformly random point on a unit sphere.

Callers 15

addGeometryFunction · 0.45
WidgetFunction · 0.45
setupMethod · 0.45
randomDirectionMethod · 0.45
generateUUIDFunction · 0.45
randIntFunction · 0.45
randFloatFunction · 0.45
randFloatSpreadFunction · 0.45
constructorMethod · 0.45
constructorMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected