public AngleBetween__Rtype__() { var rnd = new RandomSystem(1); A.SetByIndex(i => rnd.Uniform__v3rt__Direction()); angles.SetByIndex(i => rnd.Uniform__Rtype__() * (__rtype__)Constant.Pi); B.SetByIndex(i => { __v3rt__ v; do { v = rnd.Uniform__v3rt__Direction(); }while (v.Dot(A[i]).IsTiny()); __v3rt__ axis = v.Cross(A[i]).Normalized; return(__m44rt__.Rotation(axis, angles[i]).TransformDir(A[i])); }); }
private static __rtype__ RndAngle(RandomSystem rnd) => rnd.Uniform__Rtype__() * __cast__Constant.Pi;