Beispiel #1
0
valType findDistance(const point<valType, dim>& lhs, const point<valType, dim>& rhs){
    valType dist = 0.0;
    size_t dimIndex = dim;
    while(dimIndex--){
        valType t = lhs.at(dimIndex) - rhs.at(dimIndex);
        dist += t*t;
    }
    return sqrt(dist);
}
Beispiel #2
0
 bool operator()(const point<valType, dim>& lhs, const point<valType, dim>& rhs){
     return lhs.at(index) < rhs.at(index);
 }