-fixed issue with denormals in half precission, closes #1073

-added h_offset and v_offset to 3D Camera, should allow to do the same as in #1102
This commit is contained in:
Juan Linietsky
2015-01-03 11:06:53 -03:00
parent 60afd79a6e
commit cef3bd026f
7 changed files with 60 additions and 8 deletions

View File

@@ -626,7 +626,7 @@ Vector<float> String::split_floats(const String &p_splitter,bool p_allow_empty)
if (end<0)
end=len;
if (p_allow_empty || (end>from))
ret.push_back(String::to_double(&c_str()[from],end-from));
ret.push_back(String::to_double(&c_str()[from]));
if (end==len)
break;
@@ -654,8 +654,11 @@ Vector<float> String::split_floats_mk(const Vector<String> &p_splitters,bool p_a
spl_len=p_splitters[idx].length();
}
if (p_allow_empty || (end>from))
ret.push_back(String::to_double(&c_str()[from],end-from));
if (p_allow_empty || (end>from)) {
double d = String::to_double(&c_str()[from]);
print_line("get db: "+rtos(d));
ret.push_back(String::to_double(&c_str()[from]));
}
if (end==len)
break;
@@ -1959,8 +1962,10 @@ float String::to_float() const {
return to_double();
}
double String::to_double(const CharType* p_str, int p_len, const CharType **r_end) {
double String::to_double(const CharType* p_str, const CharType **r_end) {
return built_in_strtod<CharType>(p_str,(CharType**)r_end);
#if 0
#if 0
//ndef NO_USE_STDLIB
return wcstod(p_str,p_len<0?NULL:p_str+p_len);
@@ -2053,6 +2058,7 @@ double String::to_double(const CharType* p_str, int p_len, const CharType **r_en
return sign*(integer+decimal)*Math::pow(10,exp_sign*exp);
#endif
#endif
}
int64_t String::to_int(const CharType* p_str,int p_len) {
@@ -3437,7 +3443,7 @@ String String::percent_encode() const {
uint8_t c = cs[i];
if ( (c>='A' && c<='Z') || (c>='a' && c<='z') || (c>='0' && c<='9') || c=='-' || c=='_' || c=='~' || c=='.') {
char p[2]={c,0};
char p[2]={(char)c,0};
encoded+=p;
} else {
char p[4]={'%',0,0,0};