
please wait
namespace cart
with classes point
, line
, shapes, etc. All with their corresponding values/objects, functions to alter them, and operator overloads.
|
|
line.reflectX()
doing a reflection on both of its points, and triangle.moveby(,)
moving all three of its points/lines somewhere else. I think I gave myself enough possibilities with all those operations.
|
|
this
, but I can't find any specific information for its usage in this situation.const
more, for example?
|
|
==
: Yes, I was thinking the same thing. But it's useful to know if two points are in the same place, so I was thinking I could compare if the difference between two points is small enough to be considered "basically nothing". Is that a thing I should do? Is there a better way?>
, <
, >=
and <=
are leftovers from previous things, really. I could delete them, but they're not causing any harm.->
with |
, as the compiler didn't like that I used ->
in a non-void function for some reason. Is it wrong in any way to have both a global function and operators for |
and >>
? That wouldn't really change anything. Edit: I actually had already made a double linelength(point, point)
function and forgot. Renaming it to distance makes more sense.+a
, -a
, or a+b
, a-b
?
|
|
.. although there is not much use for such function. |
>
, <
, ==
that compare the length of lines, in a manner such like line1 < line2
? In my opinion, it does. Not so much for +
and -
, since it's not clear what exactly I am adding.
Does it make sense to have operators >, <, == that compare the length of lines, in a manner such like line1 < line2? |