Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
- uses: actions/checkout@v2

- name: Run clang-format
uses: jidicula/clang-format-action@v4.4.0
uses: jidicula/clang-format-action@v4.6.1
with:
clang-format-version: '13'
clang-format-version: '14'

build:
strategy:
Expand Down
6 changes: 3 additions & 3 deletions lib/include/Vulk/Color.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ struct Color
uint32_t value = r;

value <<= 8;
value += g;
value |= g;
value <<= 8;
value += b;
value |= b;
value <<= 8;
value += a;
value |= a;

return value;
}
Expand Down
8 changes: 8 additions & 0 deletions lib/include/Vulk/Vec2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#pragma once

#include <cmath>
#include <compare>
#include <ostream>

namespace vulk {
Expand All @@ -33,6 +34,13 @@ struct Vec2
constexpr Vec2(T aX, T aY) : x{aX}, y{aY} {}
constexpr explicit Vec2(T value) : x{value}, y{value} {}

constexpr Vec2(Vec2&&) noexcept = default;
constexpr Vec2(const Vec2&) noexcept = default;
constexpr Vec2& operator=(Vec2&&) noexcept = default;
constexpr Vec2& operator=(const Vec2&) noexcept = default;

constexpr auto operator<=>(const Vec2&) const noexcept = default;

constexpr Vec2 operator-() const noexcept { return Vec2{-x, -y}; }

constexpr Vec2& operator+=(const Vec2& rhs)
Expand Down
8 changes: 8 additions & 0 deletions lib/include/Vulk/Vec3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#pragma once

#include <cmath>
#include <compare>
#include <ostream>

namespace vulk {
Expand All @@ -34,6 +35,13 @@ struct Vec3
constexpr Vec3(T aX, T aY, T aZ) : x{aX}, y{aY}, z{aZ} {}
constexpr explicit Vec3(T value) : x{value}, y{value}, z{value} {}

constexpr Vec3(Vec3&&) noexcept = default;
constexpr Vec3(const Vec3&) noexcept = default;
constexpr Vec3& operator=(Vec3&&) noexcept = default;
constexpr Vec3& operator=(const Vec3&) noexcept = default;

constexpr auto operator<=>(const Vec3&) const noexcept = default;

constexpr Vec3 operator-() const noexcept { return Vec3{-x, -y, -z}; }

constexpr Vec3& operator+=(const Vec3& rhs)
Expand Down