Skip to content

Commit

Permalink
Fix invalid uniform vector init function in geometry (#1987)
Browse files Browse the repository at this point in the history
Should fix the broken vertical border padding which relies on `uniform` to work.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
  • Loading branch information
Caellian authored Jul 15, 2024
1 parent 61208fc commit ac25fcc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ struct vec {

vec(vec<T, Length> &&other) { this->value = other->value; }

static inline vec<T, Length> uniform(T x) {
return vec<T, Length>(std::array<T, Length>{x});
static inline vec<T, Length> uniform(T v) {
std::array<T, Length> data;
data.fill(v);
return vec<T, Length>(data);
}

/// @brief Returns vec component at `index`.
Expand Down

0 comments on commit ac25fcc

Please sign in to comment.