Update lazyvec / vec api as well as rect are mostly constexpr now
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user