| 1387 | return bv_variable_create_float(0.0f); |
| 1388 | } |
| 1389 | bv_variable lib_common_exp2(bv_program* prog, u8 count, bv_variable* args) |
| 1390 | { |
| 1391 | /* exp2(genType) */ |
| 1392 | if (count == 1) { |
| 1393 | if (args[0].type == bv_type_object) { // exp2(vec3), ... |
| 1394 | bv_object* vec = bv_variable_get_object(args[0]); |
| 1395 | glm::vec4 vecData = glm::exp2(sd::AsVector<4, float>(args[0])); |
| 1396 | |
| 1397 | bv_variable ret = Common::create_vec(prog, bv_type_float, vec->type->props.name_count); |
| 1398 | bv_object* retObj = bv_variable_get_object(ret); |
| 1399 | |
| 1400 | for (u16 i = 0; i < retObj->type->props.name_count; i++) |
| 1401 | retObj->prop[i] = bv_variable_create_float(vecData[i]); |
| 1402 | |
| 1403 | return ret; |
| 1404 | } |
| 1405 | else // exp2(scalar) |
| 1406 | return bv_variable_create_float(glm::exp2(bv_variable_get_float(bv_variable_cast(bv_type_float, args[0])))); |
| 1407 | } |
| 1408 | |
| 1409 | return bv_variable_create_float(0.0f); |
| 1410 | } |
| 1411 | bv_variable lib_common_floor(bv_program* prog, u8 count, bv_variable* args) |
| 1412 | { |
| 1413 | /* floor(genType) */ |
nothing calls this directly
no test coverage detected