MCPcopy Create free account
hub / github.com/SZAILAB/MaterialDFT-Demo / wrap01

Function wrap01

cpp_core/src/symmetry.cpp:15–19  ·  view source on GitHub ↗

Wrap to [0, 1)

Source from the content-addressed store, hash-verified

13
14// Wrap to [0, 1)
15double wrap01(double x) {
16 double y = std::fmod(x, 1.0);
17 if (y < 0.0) y += 1.0;
18 return y;
19}
20
21// Periodic distance
22double periodic_delta(double a, double b) {

Callers 1

find_atomic_permutationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected