3 ms·
No identity or equality concept in C for structs apart from their address, I'm afraid. In C++ one can define a comparison operator, but it has to be implemented
by jononor 10y ago
No identity or equality concept in C for structs apart from their address, I'm afraid. In C++ one can define a comparison operator, but it has to be implemented manually.
Not that you can use the language-provided == on floats anyway, due to precision issues you should always check if the difference is below a specified limit...
- krylon 10y ago> Not that you can use the language-provided == on floats anyway, due to precision issues you should always check if the difference is below a specified limit... Hehe, I've been there. ;-) Fortunately, that code dealt with physical coordinates, so if two points were less than 100µm apart, they were equal for our purposes.