Rewrite planemap and idalloc in pure C++

This commit is contained in:
2021-01-06 15:10:21 -05:00
parent b03aada315
commit 78f8610eb8
18 changed files with 913 additions and 520 deletions

View File

@@ -35,5 +35,14 @@ const stringvec trim_and_uncomment(const stringvec &lines);
std::string get_file_fingerprint(const std::string &path);
std::string get_file_contents(const std::string &fn);
double distance_squared(double x1, double y1, double x2, double y2);
// Return a pseudorandom number which is a hash function of A,B,C.
uint32_t hash3(uint32_t a, uint32_t b, uint32_t c);
// Returns a floating point value between lo and hi inclusive.
double hash_to_float(double lo, double hi, uint32_t a, uint32_t b, uint32_t c);
} // namespace util
#endif // UTIL_HPP