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

Method round_vec

src/vec.cpp:32–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30static bool isinteger(double value) { return value == floor(value); }
31
32ivec grid_volume::round_vec(const vec &p) const {
33 ivec result(dim);
34 LOOP_OVER_DIRECTIONS(dim, d) { result.set_direction(d, my_round(p.in_direction(d) * 2 * a)); }
35 return result;
36}
37
38void grid_volume::set_origin(const ivec &o) {
39 io = o;

Callers 4

output_hdf5Method · 0.80
get_source_sliceMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected