public static void GenerateRandomNormalizedVector(Random random, out Vector3Wide normal) { GenerateRandomVectorCandidate(random, out normal); while (true) { Vector3Wide.LengthSquared(ref normal, out var lengthSquared); if (Vector.LessThanAny(lengthSquared, new Vector <float>(0.0001f))) { GenerateRandomVectorCandidate(random, out normal); } else { break; } } Vector3Wide.Normalize(ref normal, out normal); }