20 std::vector<int>
convertVector(
const std::vector<std::string>& stringVector) {
22 for (
const std::string& binStr: stringVector) {
442 if((
x.value()&(1<<16))&&(
y.value()&(1<<16))){
443 if(std::abs(
y.to_float()) < std::abs(
x.to_float())) octant = 4;
445 }
else if(
x.value()&(1<<16)){
446 if(std::abs(
y.to_float()) < std::abs(
x.to_float())) octant = 3;
448 }
else if(
y.value()&(1<<16)){
449 if(std::abs(
y.to_float()) < std::abs(
x.to_float())) octant = 7;
452 if(std::abs(
y.to_float()) < std::abs(
x.to_float())) octant = 0;
458 if(octant==0||octant==3||octant==4||octant==7){
460 signed_x_f =
x.abs();
461 signed_y_f =
y.abs();
464 signed_x_f =
y.abs();
465 signed_y_f =
x.abs();
468 const std::vector<std::string> atan2_thresholds = {
476 unsigned int flag = 0;
477 for(
size_t j=0;j<atan2_thresholds.size(); ++j){
480 if(signed_x_f.to_float() >
yy.to_float())
flag = (
flag | (1<<j));
482 unsigned int octant_fine = 0;
483 if(
flag==0) octant_fine = 7;
484 else if(
flag==1) octant_fine = 6;
485 else if(
flag==3) octant_fine = 5;
486 else if(
flag==7) octant_fine = 4;
487 else if(
flag==15) octant_fine = 3;
488 else if(
flag==31) octant_fine = 2;
489 else if(
flag==63) octant_fine = 1;
490 else if(
flag==127) octant_fine = 0;
492 unsigned int octant_fine2 = 0;
493 if(
flag==0) octant_fine2 = 0;
494 else if(
flag==1) octant_fine2 = 1;
495 else if(
flag==3) octant_fine2 = 2;
496 else if(
flag==7) octant_fine2 = 3;
497 else if(
flag==15) octant_fine2 = 4;
498 else if(
flag==31) octant_fine2 = 5;
499 else if(
flag==63) octant_fine2 = 6;
500 else if(
flag==127) octant_fine2 = 7;
502 int intphi = octant << 3;
503 if(octant==0||octant==2||octant==4||octant==6){
504 intphi |= octant_fine;
506 intphi |= octant_fine2;
514 if((
x.value()&(1<<16))&&(
y.value()&(1<<16))){
515 if(std::abs(
y.to_float()) < std::abs(
x.to_float())) octant = 4;
517 }
else if(
x.value()&(1<<16)){
518 if(std::abs(
y.to_float()) < std::abs(
x.to_float())) octant = 3;
520 }
else if(
y.value()&(1<<16)){
521 if(std::abs(
y.to_float()) < std::abs(
x.to_float())) octant = 7;
524 if(std::abs(
y.to_float()) < std::abs(
x.to_float())) octant = 0;
530 if(octant==0||octant==3||octant==4||octant==7){
532 signed_x_f =
x.abs();
533 signed_y_f =
y.abs();
536 signed_x_f =
y.abs();
537 signed_y_f =
x.abs();
541 const std::vector<std::string> atan2_thresholds =
560 unsigned int flag = 0;
561 for(
size_t j=0;j<atan2_thresholds.size(); ++j){
564 if(signed_x_f.to_float() >
yy.to_float())
flag = (
flag | (1<<j));
566 unsigned int octant_fine = 0;
567 if(
flag==0) octant_fine = 15;
568 else if(
flag==1) octant_fine = 14;
569 else if(
flag==3) octant_fine = 13;
570 else if(
flag==7) octant_fine = 12;
571 else if(
flag==15) octant_fine = 11;
572 else if(
flag==31) octant_fine = 10;
573 else if(
flag==63) octant_fine = 9;
574 else if(
flag==127) octant_fine = 8;
575 else if(
flag==255) octant_fine = 7;
576 else if(
flag==511) octant_fine = 6;
577 else if(
flag==1023) octant_fine = 5;
578 else if(
flag==2047) octant_fine = 4;
579 else if(
flag==3071) octant_fine = 3;
580 else if(
flag==5119) octant_fine = 2;
581 else if(
flag==9215) octant_fine = 1;
582 else if(
flag==17407) octant_fine = 0;
584 unsigned int octant_fine2 = 0;
585 if(
flag==0) octant_fine2 = 0;
586 else if(
flag==1) octant_fine2 = 1;
587 else if(
flag==3) octant_fine2 = 2;
588 else if(
flag==7) octant_fine2 = 3;
589 else if(
flag==15) octant_fine2 = 4;
590 else if(
flag==31) octant_fine2 = 5;
591 else if(
flag==63) octant_fine2 = 6;
592 else if(
flag==127) octant_fine2 = 7;
593 else if(
flag==255) octant_fine2 = 8;
594 else if(
flag==511) octant_fine2 = 9;
595 else if(
flag==1023) octant_fine2 = 10;
596 else if(
flag==2047) octant_fine2 = 11;
597 else if(
flag==3071) octant_fine2 = 12;
598 else if(
flag==5119) octant_fine2 = 13;
599 else if(
flag==9215) octant_fine2 = 14;
600 else if(
flag==17407) octant_fine2 = 15;
602 int intphi = octant << 3;
603 if(octant==0||octant==2||octant==4||octant==6){
604 intphi |= octant_fine;
606 intphi |= octant_fine2;