File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed
src/main/java/ru/alexander Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 66
77 <groupId >ru.alexander</groupId >
88 <artifactId >BodyTreckering</artifactId >
9- <version >1.0 </version >
9+ <version >1.11 </version >
1010
1111 <properties >
1212 <maven .compiler.source>18</maven .compiler.source>
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ public static void main(String[] args) {
1515 new Source (30 , 30 , 10 )
1616 };
1717 Tracker [] trackers = { new Tracker () };
18- trackers [0 ].x = 13 ;
19- trackers [0 ].y = 5 ;
18+ trackers [0 ].x = 15 ;
19+ trackers [0 ].y = 15 ;
2020 trackers [0 ].z = 5 ;
2121 Window window = new Window (sources , trackers );
2222 }
Original file line number Diff line number Diff line change @@ -91,18 +91,18 @@ public void mouseWheelMoved(MouseWheelEvent e) {
9191 public void mousePressed (MouseEvent e ) {
9292 sx = e .getX ();
9393 sy = e .getY ();
94- for (int i = 0 ; i < Window .this .sources .length ; i ++) {
95- if (Math .sqrt (Math .pow (Window .this .sources [i ].x * scale + x - sx , 2 )
96- + Math .pow (Window .this .sources [i ].y * scale + y - sy , 2 )) < 0.7 * scale ) {
97- selected = Window .this .sources [i ];
94+ for (int i = 0 ; i < Window .this .trackers .length ; i ++) {
95+ if (Math .sqrt (Math .pow (Window .this .trackers [i ].x * scale + x - sx , 2 )
96+ + Math .pow (Window .this .trackers [i ].y * scale + y - sy , 2 )) < 0.7 * scale ) {
97+ selected = Window .this .trackers [i ];
9898 break ;
9999 }
100100 }
101101 if (selected == null ) {
102- for (int i = 0 ; i < Window .this .trackers .length ; i ++) {
103- if (Math .sqrt (Math .pow (Window .this .trackers [i ].x * scale + x - sx , 2 )
104- + Math .pow (Window .this .trackers [i ].y * scale + y - sy , 2 )) < 0.7 * scale ) {
105- selected = Window .this .trackers [i ];
102+ for (int i = 0 ; i < Window .this .sources .length ; i ++) {
103+ if (Math .sqrt (Math .pow (Window .this .sources [i ].x * scale + x - sx , 2 )
104+ + Math .pow (Window .this .sources [i ].y * scale + y - sy , 2 )) < 0.7 * scale ) {
105+ selected = Window .this .sources [i ];
106106 break ;
107107 }
108108 }
You can’t perform that action at this time.
0 commit comments