aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Math
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-10-14 22:52:40 +0800
committerchai <chaifix@163.com>2018-10-14 22:52:40 +0800
commitb1bbc998960fff2169dc5a992c47d08723472f9b (patch)
tree220f3bd5de2266e248884e11161dd715d7632ef2 /src/libjin/Math
parentfbf989f9950a38566e0fb0fc5b6a7aebc9f0fb45 (diff)
*直接渲染字符串
Diffstat (limited to 'src/libjin/Math')
-rw-r--r--src/libjin/Math/Vector2.hpp5
-rw-r--r--src/libjin/Math/Vector4.hpp1
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libjin/Math/Vector2.hpp b/src/libjin/Math/Vector2.hpp
index bee22f3..ddb8221 100644
--- a/src/libjin/Math/Vector2.hpp
+++ b/src/libjin/Math/Vector2.hpp
@@ -26,8 +26,9 @@ namespace math
}
T &x = data[0], &y = data[1]; // xy
- T &w = data[0], &h = data[1]; // wh
-
+ T &w = data[0], &h = data[1]; // wh
+ T &colum = data[0], &row = data[1]; // colum row
+
private:
T data[2];
diff --git a/src/libjin/Math/Vector4.hpp b/src/libjin/Math/Vector4.hpp
index c7dfaa8..da4110f 100644
--- a/src/libjin/Math/Vector4.hpp
+++ b/src/libjin/Math/Vector4.hpp
@@ -32,6 +32,7 @@ namespace math
T &x = data[0], &y = data[1], &z = data[2], &t = data[3]; // xyzt
T &w = data[2], &h = data[3]; // xywh
T &r = data[0], &g = data[1], &b = data[2], &a = data[3]; // rgb
+ T &left = data[0], &right = data[1], &top = data[2], &bottom = data[3]; // lrtb
private:
T data[4];