* Sets each component of this vector to a pseudo-random value between `0` and * `1`, excluding `1`. * * @return {Vector3} A reference to this vector.
()
| 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. |
no outgoing calls
no test coverage detected