| 2299 | return Common::create_float3(prog, glm::cross(x, y)); |
| 2300 | } |
| 2301 | bv_variable lib_common_distance(bv_program* prog, u8 count, bv_variable* args) |
| 2302 | { |
| 2303 | /* float distance(genType) */ |
| 2304 | bv_variable ret = bv_variable_create_float(0.0f); |
| 2305 | if (args[0].type == bv_type_object) { |
| 2306 | glm::vec4 x = sd::AsVector<4, float>(args[0]); |
| 2307 | glm::vec4 y = sd::AsVector<4, float>(args[1]); |
| 2308 | bv_variable_set_float(&ret, glm::distance(x, y)); |
| 2309 | } |
| 2310 | else { |
| 2311 | float x = bv_variable_get_float(bv_variable_cast(bv_type_float, args[0])); |
| 2312 | float y = bv_variable_get_float(bv_variable_cast(bv_type_float, args[1])); |
| 2313 | bv_variable_set_float(&ret, glm::distance(x, y)); |
| 2314 | } |
| 2315 | |
| 2316 | return ret; |
| 2317 | } |
| 2318 | bv_variable lib_common_dot(bv_program* prog, u8 count, bv_variable* args) |
| 2319 | { |
| 2320 | /* float dot(genType) */ |
nothing calls this directly
no outgoing calls
no test coverage detected