+ 2
How do operators methods work?
I recently discovered that operators like <, *, - and similar are methods whose arguments are the left and right values. However, I researched and did not find any information on how they work. For example, would the + method would not have to use itself to return a value? If so, how could that be? Would not it cause an infinite loop in which the operator calls himself trying to figure out what he does himself? Sorry for my english. :x
2 Respostas
+ 1
Here's some demonstration code for adding matrices:
https://code.sololearn.com/crQLZ2gdruDZ/#cs
Hopefully you can adapt that for - and * etc?
+ 2
How fast! Thank you so much, I can understand that much better now.