Plasma Engine  2.0
Loading...
Searching...
No Matches
Size_inl.h
1#pragma once
2
3template <typename Type>
4PL_ALWAYS_INLINE plSizeTemplate<Type>::plSizeTemplate() = default;
5
6template <typename Type>
7PL_ALWAYS_INLINE plSizeTemplate<Type>::plSizeTemplate(Type width, Type height)
8 : width(width)
9 , height(height)
10{
11}
12
13template <typename Type>
14PL_ALWAYS_INLINE bool plSizeTemplate<Type>::HasNonZeroArea() const
15{
16 return (width > 0) && (height > 0);
17}
18
19template <typename Type>
20PL_ALWAYS_INLINE bool operator==(const plSizeTemplate<Type>& v1, const plSizeTemplate<Type>& v2)
21{
22 return v1.height == v2.height && v1.width == v2.width;
23}
24
25template <typename Type>
26PL_ALWAYS_INLINE bool operator!=(const plSizeTemplate<Type>& v1, const plSizeTemplate<Type>& v2)
27{
28 return v1.height != v2.height || v1.width != v2.width;
29}
A simple size class templated on the type for width and height.
Definition Size.h:9
bool HasNonZeroArea() const
Returns true if the area described by the size is non zero.
Definition Size_inl.h:14
plSizeTemplate()
Default constructor does not initialize the data.