Closed CodyNinja1 closed 6 months ago
For me, the last line returns vec4(1.07451, 1.20784, 1.34118, 1.47451)
and it's the same on every game boot so maybe it has to do with what plugins, settings, username, etc. you have. In any case I agree these should raise exceptions
I fixed the call to Text::ParseHexColor
so that it returns <0, 0, 0, 0>
now.
Not sure if I like throwing exceptions for these, mostly as this would be a big behavioral change that might have some unexpected consequences.
I suppose you just want to check if the parsing worked? What about TryParseInt
, TryParseFloat
, TryParseHexColor
functions?
Sure! That could work for me and my use case, I just want a way to see if either parsing worked or if a string is able to be parsed (e.g. string.IsNumeric()
or string.IsHex()
)
Example:
I personally think those functions should raise an error instead of returning unusable values.