| 447 | return ret; |
| 448 | } |
| 449 | bv_variable lib_common_vec_operator_divide(bv_program* prog, bv_object* me, u8 count, bv_variable* args) |
| 450 | { |
| 451 | bv_variable ret = bv_variable_create_void(); |
| 452 | |
| 453 | if (count == 1) { |
| 454 | // vec / vec |
| 455 | if (args[0].type == bv_type_object) { |
| 456 | bv_object* vec = bv_variable_get_object(args[0]); |
| 457 | |
| 458 | bv_type mtype = merge_type(me->prop[0].type, vec->prop[0].type); |
| 459 | |
| 460 | ret = create_vec(prog, mtype, me->type->props.name_count); |
| 461 | bv_object* retObj = bv_variable_get_object(ret); |
| 462 | |
| 463 | for (u16 i = 0; i < me->type->props.name_count; i++) { |
| 464 | bv_variable_deinitialize(&retObj->prop[i]); |
| 465 | retObj->prop[i] = bv_variable_cast(mtype, bv_variable_op_divide(prog, me->prop[i], vec->prop[i])); |
| 466 | } |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | return ret; |
| 471 | } |
| 472 | bv_variable lib_common_vec_operator_multiply(bv_program* prog, bv_object* me, u8 count, bv_variable* args) |
| 473 | { |
| 474 | bv_variable ret = bv_variable_create_void(); |
nothing calls this directly
no test coverage detected