mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 10:19:20 +00:00
LibSoftGPU: Remove superfluous braces in Clipper
This commit is contained in:
parent
a1686db2de
commit
60fccdbd71
Notes:
sideshowbarker
2024-07-18 05:01:22 +09:00
Author: https://github.com/gmta
Commit: 60fccdbd71
Pull-request: https://github.com/SerenityOS/serenity/pull/13601
Reviewed-by: https://github.com/Quaker762 ✅
Reviewed-by: https://github.com/sunverwerth ✅
1 changed files with 6 additions and 7 deletions
|
@ -16,19 +16,18 @@ namespace SoftGPU {
|
|||
template<Clipper::ClipPlane plane>
|
||||
static constexpr bool point_within_clip_plane(FloatVector4 const& vertex)
|
||||
{
|
||||
if constexpr (plane == Clipper::ClipPlane::LEFT) {
|
||||
if constexpr (plane == Clipper::ClipPlane::LEFT)
|
||||
return vertex.x() >= -vertex.w();
|
||||
} else if constexpr (plane == Clipper::ClipPlane::RIGHT) {
|
||||
else if constexpr (plane == Clipper::ClipPlane::RIGHT)
|
||||
return vertex.x() <= vertex.w();
|
||||
} else if constexpr (plane == Clipper::ClipPlane::TOP) {
|
||||
else if constexpr (plane == Clipper::ClipPlane::TOP)
|
||||
return vertex.y() <= vertex.w();
|
||||
} else if constexpr (plane == Clipper::ClipPlane::BOTTOM) {
|
||||
else if constexpr (plane == Clipper::ClipPlane::BOTTOM)
|
||||
return vertex.y() >= -vertex.w();
|
||||
} else if constexpr (plane == Clipper::ClipPlane::NEAR) {
|
||||
else if constexpr (plane == Clipper::ClipPlane::NEAR)
|
||||
return vertex.z() >= -vertex.w();
|
||||
} else if constexpr (plane == Clipper::ClipPlane::FAR) {
|
||||
else if constexpr (plane == Clipper::ClipPlane::FAR)
|
||||
return vertex.z() <= vertex.w();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue