withRandomDirection

abstract fun withRandomDirection(rng: Random = MathUtils.random): T

Returns a vector of same length and a random direction.

Parameters

rng

Random number generator to use (MathUtils.random by default)