| 962 | return bv_variable_create_float(0.0f); |
| 963 | } |
| 964 | bv_variable lib_common_sin(bv_program* prog, u8 count, bv_variable* args) |
| 965 | { |
| 966 | /* sin(genType) */ |
| 967 | if (count == 1) { |
| 968 | if (args[0].type == bv_type_object) { // sin(vec3), ... |
| 969 | bv_object* vec = bv_variable_get_object(args[0]); |
| 970 | glm::vec4 vecData = glm::sin(sd::AsVector<4, float>(args[0])); |
| 971 | |
| 972 | bv_variable ret = Common::create_vec(prog, bv_type_float, vec->type->props.name_count); |
| 973 | bv_object* retObj = bv_variable_get_object(ret); |
| 974 | |
| 975 | for (u16 i = 0; i < retObj->type->props.name_count; i++) |
| 976 | retObj->prop[i] = bv_variable_create_float(vecData[i]); |
| 977 | |
| 978 | return ret; |
| 979 | } |
| 980 | else |
| 981 | return bv_variable_create_float(glm::sin(bv_variable_get_float(bv_variable_cast(bv_type_float, args[0])))); |
| 982 | } |
| 983 | |
| 984 | return bv_variable_create_float(0.0f); |
| 985 | } |
| 986 | bv_variable lib_common_sinh(bv_program* prog, u8 count, bv_variable* args) |
| 987 | { |
| 988 | /* sinh(genType) */ |
nothing calls this directly
no test coverage detected