We’re upgrading Vector2 apis? Let’s also allow you to construct a Vector2 with a Vector3 and vice versa. I hate the nuance of having to switch between the two while using InputObjects.
I would have to agree with this. If I asked you to add 10% to 100 what would the answer be, 110, 100.1 or perhaps even 111.1111? Methods are the solution here. You should always be explicit when converting data types.
Agreed. For cases where one data type is frequently converted to another, it should be done clearly and explicitly through a constructor for the target data type, e.g.
UDim2.new(0,25,0,25) + UDim2.Vector2ToOffset(5,5)
and
Vector2.new() + Vector2.Vector3ToXY(vector3)
That would fine maybe for UDims, but when it comes to something like vectors, try Vector2.AddByVector3(), Vector2.SubtractByVector3(), Vector2.MultiplyByVector3(), etc. A constructor for a Vector2 from a Vector3 doesn’t require as many predefined API members, because you choose behavior with which operators you use.
Because the two datatypes interact with one another with regards to guis, and it would be handy if they could just interact with one another without me having to generate a new LuaBridge to cast it over to that type. My suggestion was specific, I wasn’t asking for any of the other junk and conventions people are bringing up in this thread.