change pointer to const convention
add simple periodic distance cpp test
add direct image convention test, remove confusing return statements
add more distance cpp tests