示例#1
0
 public static V3d UniformV3dFullClosed(this IRandomUniform rnd)
 {
     return(new V3d(rnd.UniformDoubleFullClosed(),
                    rnd.UniformDoubleFullClosed(),
                    rnd.UniformDoubleFullClosed()));
 }
示例#2
0
 public static V3d UniformV3dFullClosed(this IRandomUniform rnd, Box3d box)
 {
     return(box.Lerp(rnd.UniformDoubleFullClosed(),
                     rnd.UniformDoubleFullClosed(),
                     rnd.UniformDoubleFullClosed()));
 }
示例#3
0
 public static V2d UniformV2dFullClosed(this IRandomUniform rnd, Box2d box)
 {
     return(new V2d(box.Min.X + rnd.UniformDoubleFullClosed() * (box.Max.X - box.Min.X),
                    box.Min.Y + rnd.UniformDoubleFullClosed() * (box.Max.Y - box.Min.Y)));
 }