Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <T>
- bool SGVector<T>::equals(SGVector<T>& other, float accuracy=0, bool tolerance=false)
- {
- if(other.vlen != vlen)
- return false ;
- switch(T)
- {
- case float32_t:
- for(int i=0 ; i<other.vlen ; i++)
- {
- if(!CMath::fequals<float32_t>(vector[i],other.vector[i] , accuracy , tolerance))
- return false ;
- }
- return true ;
- break ;
- case float32_t:
- for(int i=0 ; i<other.vlen ; i++)
- {
- if(!CMath::fequals<float32_t>(vector[i],other.vector[i] , accuracy , tolerance))
- return false ;
- }
- return true ;
- break ;
- }
- return true ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement