MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / normalize

Function normalize

src/serializers/GltfSerializer.cpp:505–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503
504namespace {
505 void normalize(std::array<double, 3>& v) {
506 auto l = std::sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
507
508 v[0] /= l;
509 v[1] /= l;
510 v[2] /= l;
511 }
512
513 void cross(const std::array<double, 3>& v1, const std::array<double, 3>& v2, std::array<double, 3>& result) {
514 result[0] = v1[1] * v2[2] - v1[2] * v2[1];

Callers 1

setFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected