fixed declaration mismatch bug: origin vs friend
do not depend on dlib, yet
std::pow: use correctly typed arguments