MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / setLength

Method setLength

src/utilities/geometry/Vector3d.cpp:122–133  ·  view source on GitHub ↗

set length

Source from the content-addressed store, hash-verified

120
121/// set length
122bool Vector3d::setLength(double newLength) {
123 bool result = false;
124 double currentLength = length();
125 if (currentLength > 0) {
126 double mult = newLength / currentLength;
127 m_storage[0] *= mult;
128 m_storage[1] *= mult;
129 m_storage[2] *= mult;
130 result = true;
131 }
132 return result;
133}
134
135/// orthogonal right
136Vector3d Vector3d::orthogonalRight() const {

Callers 5

windowGroupPointsMethod · 0.45
makeGeometriesMethod · 0.45
moveVerticesTowardsPointFunction · 0.45
getLinearAlphaFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected