MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / length

Function length

source/MRMesh/miniply.cpp:115–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113
114 static inline float dot(Vec2 lhs, Vec2 rhs) { return lhs.x * rhs.x + lhs.y * rhs.y; }
115 static inline float length(Vec2 v) { return std::sqrt(dot(v, v)); }
116 static inline Vec2 normalize(Vec2 v) { float len = length(v); return Vec2{ v.x / len, v.y / len }; }
117
118

Callers 5

Vector2Class · 0.70
untruncateConeMethod · 0.70
normalizeFunction · 0.70
Vector4Class · 0.70

Calls 1

dotFunction · 0.70

Tested by

no test coverage detected