mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibGfx: Add IntVector2/3/4
types
The type `Vector<N, int>` is used often enough that it warrants its own dedicated type.
This commit is contained in:
parent
f5ea93edfd
commit
54108263d6
Notes:
sideshowbarker
2024-07-17 11:17:59 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/54108263d6 Pull-request: https://github.com/SerenityOS/serenity/pull/13835 Reviewed-by: https://github.com/sunverwerth ✅
3 changed files with 9 additions and 3 deletions
|
@ -17,8 +17,9 @@ namespace Gfx {
|
|||
|
||||
template<class T>
|
||||
using Vector2 = VectorN<2, T>;
|
||||
using FloatVector2 = Vector2<float>;
|
||||
using DoubleVector2 = Vector2<double>;
|
||||
using FloatVector2 = Vector2<float>;
|
||||
using IntVector2 = Vector2<int>;
|
||||
|
||||
}
|
||||
|
||||
|
@ -36,4 +37,5 @@ struct Formatter<Gfx::Vector2<T>> : Formatter<StringView> {
|
|||
|
||||
using Gfx::DoubleVector2;
|
||||
using Gfx::FloatVector2;
|
||||
using Gfx::IntVector2;
|
||||
using Gfx::Vector2;
|
||||
|
|
|
@ -17,8 +17,9 @@ namespace Gfx {
|
|||
|
||||
template<class T>
|
||||
using Vector3 = VectorN<3, T>;
|
||||
using FloatVector3 = Vector3<float>;
|
||||
using DoubleVector3 = Vector3<double>;
|
||||
using FloatVector3 = Vector3<float>;
|
||||
using IntVector3 = Vector3<int>;
|
||||
|
||||
}
|
||||
|
||||
|
@ -36,4 +37,5 @@ struct Formatter<Gfx::Vector3<T>> : Formatter<StringView> {
|
|||
|
||||
using Gfx::DoubleVector3;
|
||||
using Gfx::FloatVector3;
|
||||
using Gfx::IntVector3;
|
||||
using Gfx::Vector3;
|
||||
|
|
|
@ -17,8 +17,9 @@ namespace Gfx {
|
|||
|
||||
template<class T>
|
||||
using Vector4 = VectorN<4, T>;
|
||||
using FloatVector4 = Vector4<float>;
|
||||
using DoubleVector4 = Vector4<double>;
|
||||
using FloatVector4 = Vector4<float>;
|
||||
using IntVector4 = Vector4<int>;
|
||||
|
||||
}
|
||||
|
||||
|
@ -36,4 +37,5 @@ struct Formatter<Gfx::Vector4<T>> : Formatter<StringView> {
|
|||
|
||||
using Gfx::DoubleVector4;
|
||||
using Gfx::FloatVector4;
|
||||
using Gfx::IntVector4;
|
||||
using Gfx::Vector4;
|
||||
|
|
Loading…
Reference in a new issue