MCPcopy Create free account
hub / github.com/Notgnoshi/generative / generate

Function generate

tools/point-cloud.rs:54–59  ·  view source on GitHub ↗
(points: usize, domain: RandomDomain, rng: &mut StdRng)

Source from the content-addressed store, hash-verified

52}
53
54fn generate(points: usize, domain: RandomDomain, rng: &mut StdRng) -> Vec<Double2> {
55 match domain {
56 RandomDomain::UnitSquare => generate_square(points, rng),
57 RandomDomain::UnitCircle => generate_circle(points, rng),
58 }
59}
60
61fn generate_square(points: usize, rng: &mut StdRng) -> Vec<Double2> {
62 let mut v = Vec::with_capacity(points);

Callers 1

mainFunction · 0.85

Calls 2

generate_squareFunction · 0.85
generate_circleFunction · 0.85

Tested by

no test coverage detected