0 Members and 1 Guest are viewing this topic.
template <typename T>bool operator ==(const Vector2<T>& V1, const Vector2<T>& V2){ return (V1.x == V2.x) && (V1.y == V2.y);}template <typename T>bool operator !=(const Vector2<T>& V1, const Vector2<T>& V2){ return (V1.x != V2.x) || (V1.y != V2.y);}template <typename T>bool operator ==(const Vector3<T>& V1, const Vector3<T>& V2){ return (V1.x == V2.x) && (V1.y == V2.y) && (V1.z == V2.z);}template <typename T>bool operator !=(const Vector3<T>& V1, const Vector3<T>& V2){ return (V1.x != V2.x) || (V1.y != V2.y) || (V1.z != V2.z);}
This will not work reliable for Floats but only Integers.
But it's up to users to define how they want to compare their float vectors, if they want to use a delta.
Actually, it's called epsilon, not delta
QuoteActually, it's called epsilon, not deltaOh, I didn't know that there was a strict naming for this. But actually I always use "epsilon", don't know why I chose "delta" this time :lol: