MCPcopy Create free account
hub / github.com/NanoComp/meep / fprint_vec

Function fprint_vec

doc/docs/Developer_Codes/WriteChunkInfo.cpp:36–43  ·  view source on GitHub ↗

Pretty=true --> {x,y,z} Pretty=false --> x y z

Source from the content-addressed store, hash-verified

34// Pretty=true --> {x,y,z}
35// Pretty=false --> x y z
36void fprint_vec(FILE *f, vec v, bool Pretty = false) {
37 const char *s = Pretty ? "{" : " ";
38 LOOP_OVER_DIRECTIONS(v.dim, d) {
39 fprintf(f, "%s%e", s, v.in_direction(d));
40 if (Pretty) s = ",";
41 }
42 fprintf(f, "%s", Pretty ? "} " : " ");
43}
44
45// Pretty=true --> {x,y,z}
46// Pretty=false --> x y z

Callers 1

print_chunk_infoFunction · 0.85

Calls 2

LOOP_OVER_DIRECTIONSFunction · 0.50
in_directionMethod · 0.45

Tested by

no test coverage detected