I rewatched it, but there's no error
#include <iostream>
using namespace std;
class Vector2
{
public:
Vector2(float _x = 0.0f, float _y = 0.0f) : x(_x), y(_y) {}
float Magnitude() { return (float)sqrt(x * x + y * y); }
private:
float x{ 0 };
float y{ 0 };
};
int main()
{
Vector2 a;
Vector2 b{ 3,-3 };
Vector2 c{ numeric_limits<float>::max(),numeric_limits<float>::max() };
cout << a.Magnitude() << '\n';
cout << b.Magnitude() << '\n';
cout << c.Magnitude() << '\n';
}
565 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
593 Uncaught (inpromise) Error on Electron: An object could not be cloned
573 PHP ssh2_scp_send fails to send files as intended
868 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
592 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.