Skip to content

Commit

Permalink
Fix double to float warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dpjudas committed Feb 10, 2025
1 parent b83a268 commit 0467b5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SurrealEngine/Math/vec.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ inline vec3 refract(const vec3& I, const vec3& N, float eta) { float NdotI = dot
inline dvec3 refract(const dvec3& I, const dvec3& N, double eta) { double NdotI = dot(N, I); double k = 1.0 - eta * eta * (1.0 - NdotI * NdotI); return k < 0.0 ? dvec3(0.0) : I * eta - (eta * NdotI + std::sqrt(k)) * N; }

inline float dist_squared(const vec3& a, const vec3& b) { return dot(b - a, b - a); }
inline float dist_squared(const dvec3& a, const dvec3& b) { return dot(b - a, b - a); }
inline double dist_squared(const dvec3& a, const dvec3& b) { return dot(b - a, b - a); }

template<typename T>
T mix(T a, T b, float t) { return a * (1.0f - t) + b * t; }
Expand Down

0 comments on commit 0467b5f

Please sign in to comment.