diff options
Diffstat (limited to 'Userland/Libraries/LibGfx/Triangle.cpp')
-rw-r--r-- | Userland/Libraries/LibGfx/Triangle.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGfx/Triangle.cpp b/Userland/Libraries/LibGfx/Triangle.cpp index cc5e1c6d6d..5ba03a2a9d 100644 --- a/Userland/Libraries/LibGfx/Triangle.cpp +++ b/Userland/Libraries/LibGfx/Triangle.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, Shannon Booth <shannon.ml.booth@gmail.com> + * Copyright (c) 2022, Andreas Kling <kling@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ @@ -9,7 +10,14 @@ namespace Gfx { -String Triangle::to_string() const +template<> +String Triangle<int>::to_string() const +{ + return String::formatted("({},{},{})", m_a, m_b, m_c); +} + +template<> +String Triangle<float>::to_string() const { return String::formatted("({},{},{})", m_a, m_b, m_c); } |