9 * @brief default constructor
22 * @param [in] a Width value .
23 * @param [in] b Height value.
25 public Size(float a, float b):this()
32 * @brief constructor with vector2 class object
35 * @param [in] o The Vector2 with Width, Height values.
37 public Size(Vector2 o)
43 * @brief Copy constructor
46 * @param [in] o The Size having Width & Y.
49 : this(a.v[0], a.v[1])
53 ///< name "W", type float (Size Width value)
61 ///< name "H", type float (Size Height value)
73 * @param [in] l The Size to add.
74 * @param [in] r The Size to add
75 * @return A reference to this
77 public static Size operator +(Size l, Size r)
79 return new Size(l.W + r.W, l.H + r.H);
86 * @param [in] l The Size to substract.
87 * @param [in] r The Size to substract
88 * @return A reference to this
90 public static Size operator -(Size l, Size r)
92 return new Size(l.W - r.W, l.H - r.H);
99 * @param [in] a The Size to multiply
100 * @param [in] b The Size to multiply
101 * @return A reference to this
103 public static Size operator *(Size a, double b)
105 return new Size((float)(a.W * b), (float)(a.H * b));
112 * @param [in] a The Size to divide.
113 * @param [in] b The Size to divide
114 * @return float of the size division
116 public static float operator /(Size a, Size b)
118 return (float)System.Math.Sqrt((a.W / b.W) * (a.H / b.H));
125 * @param [in] obj The Size object to compare.
126 * @return bool, whether object equal or not
128 public override bool Equals(object obj)
130 Size that = obj as Size;
135 return this.W == that.W && this.H == that.H;
143 * @return returns a copy of Size object
147 Size copy = new Size(W, H);