GNode library (C++)
Loading...
Searching...
No Matches
point.hpp
Go to the documentation of this file.
1/* Copyright (c) 2023 Otto Link. Distributed under the terms of the GNU General
2 * Public License. The full license is in the file LICENSE, distributed with
3 * this software. */
4
19#pragma once
20
21namespace gnode
22{
23
32struct Point
33{
37 float x;
38
42 float y;
43
47 Point() : x(0), y(0) {}
48
54 Point(float x, float y) : x(x), y(y) {}
55};
56
57} // namespace gnode
Definition data.hpp:23
Represents a point in a 2D space.
Definition point.hpp:33
Point(float x, float y)
Constructs a Point with specified coordinates.
Definition point.hpp:54
Point()
Default constructor that initializes the point to the origin (0,0).
Definition point.hpp:47
float x
X-coordinate of the point.
Definition point.hpp:37
float y
Y-coordinate of the point.
Definition point.hpp:42