diff --git a/SimulationPlugin/Source/SimulationModule/Public/GeographicCoordinates.h b/SimulationPlugin/Source/SimulationModule/Public/GeographicCoordinates.h index 660fd52..13c6ddb 100644 --- a/SimulationPlugin/Source/SimulationModule/Public/GeographicCoordinates.h +++ b/SimulationPlugin/Source/SimulationModule/Public/GeographicCoordinates.h @@ -52,6 +52,22 @@ struct FGeographicCoordinates * @return Reference to vector after copy. */ FORCEINLINE FGeographicCoordinates& operator=(const FGeographicCoordinates& Other); + + /** + * Compare another FGeographicCoordinates into this one + * + * @param Other The coordinate to compare with. + * @return true if the coordinates are equal, false otherwise. + */ + FORCEINLINE bool operator==(const FGeographicCoordinates& Other) const; + + /** + * Copy another FVector into this one + * + * @param Other The coordinate to compare with. + * @return true if the coordinates are not equal, false otherwise. + */ + FORCEINLINE bool operator!=(const FGeographicCoordinates& Other) const; #endif }; @@ -79,4 +95,16 @@ FORCEINLINE FGeographicCoordinates& FGeographicCoordinates::operator=(const FGeo return *this; } +FORCEINLINE bool operator==(const FGeographicCoordinates& Other) const +{ + return (this->Latitude == Other.Latitude) && + (this->Longitude == Other.Longitude) && + (this->Altitude == Other.Altitude); +} + +FORCEINLINE bool operator!=(const FGeographicCoordinates& Other) const +{ + return !(*this==Other); +} + #endif