I've seen this in UE4 C++ code and in SFML C++ code and I can't seem to find out what this is exactly. I've searched google and found nothing that seems relevant to what I'm looking for.
Ex. #1 MyClassObject.Myfunction().y
Ex. #2 instantiatedObject.getPosition().x
Ex. #3 if (spriteBee.getPosition().x < -100)
It's the .X & .Y part that I'm specifically asking about.
For more context, in SFML you can get an object's X or Y coordinates specifically by using .X or .Y at the end of the getPosition() member method. I want to read up on this because I find having a member method like this could be very useful but I don't know the name of what this is exactly. Any help would be greatly appreciated.
I'm well aware that if I wanted to reproduce this I could just have a getX or getY member function and call it a day but I would love to know how this specific implementation is achieved.