Update lazyvec / vec api as well as rect are mostly constexpr now

This commit is contained in:
2026-03-22 00:15:14 +01:00
parent 4db5d98cb2
commit b49c0bd3dc
10 changed files with 108 additions and 105 deletions
+3 -3
View File
@@ -25,7 +25,7 @@ SOFTWARE.
constexpr std::string_view _funcs = R"text(
double Len() const {{ return std::sqrt(SqLen()); }}
double SqLen() const {{ return {1}; }}
constexpr double SqLen() const {{ return {1}; }}
template <typename T1>
double Distance(const vec{0}<T1>& v) const {{
@@ -41,14 +41,14 @@ constexpr std::string_view _funcs = R"text(
}}
template <typename T1>
T Dot(const vec{0}<T1>&v) const {{
constexpr T Dot(const vec{0}<T1>&v) const {{
return {2};
}}
)text";
constexpr std::string_view _cross = R"text(
template <typename T1>
vec3<T> Cross(const vec3<T1>& v) const {
constexpr vec3<T> Cross(const vec3<T1>& v) const {
return vec3<T>(y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x);
}
)text";