5 public class Size : Vector2
12 * @param [in] a The Size X.
13 * @param [in] b The Size Y.
15 public Size(float a, float b)
33 * @param [in] o The Vector Size X, Y.
35 public Size(Vector2 o)
45 * @param [in] o The Size X, Y.
48 : base(a.width, a.height)
52 ///< name "W", type float (Size W value)
57 set { width = value; }
60 ///< name "H", type float (Size W value)
64 get { return height; }
65 set { height = value; }
72 * @param [in] l The Size to add.
73 * @param [in] r The Size to add
74 * @return A reference to this
76 public static Size operator +(Size l, Size r)
78 return new Size(l.W + r.W, l.H + r.H);
85 * @param [in] l The Size to add.
86 * @param [in] r The Size to add
87 * @return A reference to this
89 public static Size operator -(Size l, Size r)
91 return new Size(l.W - r.W, l.H - r.H);
98 * @param [in] l The Size to add.
99 * @param [in] r The Size to add
100 * @return A reference to this
102 public static Size operator *(Size a, double b)
104 return new Size((int)(a.W * b), (int)(a.H * b));
111 * @param [in] l The Size to add.
112 * @param [in] r The Size to add
113 * @return A reference to this
115 public static float operator /(Size a, Size b)
117 return (float)System.Math.Sqrt((a.W / b.W) * (a.H / b.H));
124 * @param [in] o The Size object to compare.
125 * @param [in] r The Size to add
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;
142 * @return int, hascode of Size
144 public override int GetHashCode()
153 * @return Size object
157 Size copy = new Size(W, H);