| 1006 | return bv_variable_create_float(0.0f); |
| 1007 | } |
| 1008 | bv_variable lib_common_tan(bv_program* prog, u8 count, bv_variable* args) |
| 1009 | { |
| 1010 | /* tan(genType) */ |
| 1011 | if (count == 1) { |
| 1012 | if (args[0].type == bv_type_object) { // tan(vec3), ... |
| 1013 | bv_object* vec = bv_variable_get_object(args[0]); |
| 1014 | glm::vec4 vecData = glm::tan(sd::AsVector<4, float>(args[0])); |
| 1015 | |
| 1016 | bv_variable ret = Common::create_vec(prog, bv_type_float, vec->type->props.name_count); |
| 1017 | bv_object* retObj = bv_variable_get_object(ret); |
| 1018 | |
| 1019 | for (u16 i = 0; i < retObj->type->props.name_count; i++) |
| 1020 | retObj->prop[i] = bv_variable_create_float(vecData[i]); |
| 1021 | |
| 1022 | return ret; |
| 1023 | } |
| 1024 | else // tan(scalar) |
| 1025 | return bv_variable_create_float(glm::tan(bv_variable_get_float(bv_variable_cast(bv_type_float, args[0])))); |
| 1026 | } |
| 1027 | |
| 1028 | return bv_variable_create_float(0.0f); |
| 1029 | } |
| 1030 | bv_variable lib_common_tanh(bv_program* prog, u8 count, bv_variable* args) |
| 1031 | { |
| 1032 | /* tanh(genType) */ |
nothing calls this directly
no test coverage detected