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

Method setScale

src/utilities/units/Unit.cpp:113–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 }
112
113 bool Unit_Impl::setScale(int scaleExponent) {
114 ScaleConstant candidate = ScaleFactory::instance().createScale(scaleExponent);
115 if (candidate().value == 0.0) {
116 return false;
117 }
118 m_scale = candidate;
119 return true;
120 }
121
122 bool Unit_Impl::setScale(const std::string& scaleAbbreviation) {
123 ScaleConstant candidate = ScaleFactory::instance().createScale(scaleAbbreviation);

Callers 12

getDoubleFromQuantityMethod · 0.45
convertMethod · 0.45
m_convertToSIMethod · 0.45
m_convertFromSIMethod · 0.45
createUnitMethod · 0.45
prettyStringMethod · 0.45
IddUnitStringMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls 1

createScaleMethod · 0.80

Tested by 4

TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36