3 ms·
Good stuff. Good to know. Thanks. Just to explain a bit what made me think of this: I'm doing Object-Oriented Programming. I have data-structures like Array, l
by galaxyLogic 6y ago
Good stuff. Good to know. Thanks.
Just to explain a bit what made me think of this: I'm doing Object-Oriented Programming. I have data-structures like Array, let's say 2-array. But because it is OOP I can also associate operations with the data-structures. If I store numbers into a two-array and add operations of complex arithmetic as my methods I now have Complex Numbers. But what If I want to do cross-product and dot-product too? I just add those methods into my class. I now have a class I could name ComplexNumber, or I could name it Vector2D.
Instead of creating separate classes for Complex Numbers and Vectors it seems to me it gets simpler if I create just one class, and add operations to it as needed.
So I wonder when I was taught complex numbers why didn't they tell me that I can also do cross-products on them . And when I was taught vectors why didn't they tell me they are really complex numbers, they just added two new operations to them, the cross-product and dot-product... ?