Skip to content

Commit

Permalink
add exp
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNumbat committed Apr 18, 2024
1 parent 3e190e8 commit ba31151
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rpp/impl/math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ namespace rpp::Math {
[[nodiscard]] f64 pow(f64 x, f64 y) noexcept {
return ::pow(x, y);
}
[[nodiscard]] f32 exp(f32 x) noexcept {
return ::expf(x);
}
[[nodiscard]] f64 exp(f64 x) noexcept {
return ::exp(x);
}
[[nodiscard]] f32 floor(f32 v) noexcept {
return ::floorf(v);
}
Expand Down
2 changes: 2 additions & 0 deletions rpp/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ template<Int I>
[[nodiscard]] f64 hypot(f64 x, f64 y) noexcept;
[[nodiscard]] f32 pow(f32 x, f32 y) noexcept;
[[nodiscard]] f64 pow(f64 x, f64 y) noexcept;
[[nodiscard]] f32 exp(f32 x) noexcept;
[[nodiscard]] f64 exp(f64 x) noexcept;
[[nodiscard]] f32 floor(f32 v) noexcept;
[[nodiscard]] f64 floor(f64 v) noexcept;
[[nodiscard]] f32 ceil(f32 v) noexcept;
Expand Down

0 comments on commit ba31151

Please sign in to comment.