Implement a few more properties

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
2023-07-28 20:17:09 +00:00
co-authored by AMay
parent 3617ec3c5b
commit bd407aca83
7 changed files with 51 additions and 13 deletions
+7
View File
@@ -1218,6 +1218,13 @@ float operator ""_F(const char*key,std::size_t len){
return DATA.GetProperty(std::string(key,len)).GetReal();
}
float operator ""_FRange(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::cout<<"Reading "<<std::string(key,len)<<std::endl;
}
return util::random(DATA.GetProperty(std::string(key,len)).GetReal(1)-DATA.GetProperty(std::string(key,len)).GetReal(0))+DATA.GetProperty(std::string(key,len)).GetReal(0);
}
double operator ""_D(const char*key,std::size_t len){
if(utils::datafile::DEBUG_ACCESS_OPTIONS){
std::cout<<std::string(key,len)<<std::endl;