diff options
Diffstat (limited to 'src/math/size.h')
-rw-r--r-- | src/math/size.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/math/size.h b/src/math/size.h index 781b9a4..03cffaa 100644 --- a/src/math/size.h +++ b/src/math/size.h @@ -20,6 +20,9 @@ #pragma once +#include "math/point.h" + + // Math module namespace namespace Math { @@ -58,6 +61,12 @@ struct Size { w = h = 0.0f; } + + //! Converts Point to Size + inline static Math::Size FromPoint(Math::Point p) + { + return Math::Size(p.x, p.y); + } }; // struct Size |