equal
deleted
inserted
replaced
939 //within its 1/6 long phase the relativ position |
939 //within its 1/6 long phase the relativ position |
940 //determines the power of the color changed in |
940 //determines the power of the color changed in |
941 //that phase |
941 //that phase |
942 //we normalize that to one, to be able to give percentage |
942 //we normalize that to one, to be able to give percentage |
943 //value for the function |
943 //value for the function |
944 double rel_pos=(pos-(phase/6))*6; |
944 double rel_pos=(pos-(phase/6.0))*6.0; |
945 |
945 |
946 switch(phase) |
946 switch(phase) |
947 { |
947 { |
948 case 0: |
948 case 0: |
949 color.set_rgb_p (1, 0, 1-rel_pos); |
949 color.set_rgb_p (1, 0, 1-rel_pos); |
959 break; |
959 break; |
960 case 4: |
960 case 4: |
961 color.set_rgb_p (0, 1-rel_pos, 1); |
961 color.set_rgb_p (0, 1-rel_pos, 1); |
962 break; |
962 break; |
963 case 5: |
963 case 5: |
964 color.set_rgb_p ((rel_pos/3), 0, 1); |
964 color.set_rgb_p ((rel_pos/3.0), 0, 1); |
965 break; |
965 break; |
966 default: |
966 default: |
967 std::cout << "Wrong phase: " << phase << " " << pos << std::endl; |
967 std::cout << "Wrong phase: " << phase << " " << pos << std::endl; |
968 } |
968 } |
969 } |
969 } |