MCPcopy Create free account
hub / github.com/cocos/cocos-engine / parseCssFloat

Function parseCssFloat

native/cocos/base/csscolorparser.cpp:243–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243float parseCssFloat(const ccstd::string &str) { // float or percentage.
244 if (str.length() && str.back() == '%') {
245 return clampCssFloat(parseFloat(str) / 100.0f);
246 }
247 return clampCssFloat(parseFloat(str));
248}
249
250float cssHueToRgb(float m1, float m2, float h) {
251 if (h < 0.0f) {

Callers 1

parseFunction · 0.85

Calls 3

clampCssFloatFunction · 0.85
parseFloatFunction · 0.85
lengthMethod · 0.45

Tested by

no test coverage detected