atan2() ist bei mir nicht drin, habe PB 4.40...
Trotzdem danke! ich kann die Winkel bestimmt auch anders bestimmen.
Kreisrunde Menüs - Maussteuerung
Re: Kreisrunde Menüs - Maussteuerung
"I became insane, with long intervals of horrible sanity." - Edgar A. Poe
-
- Beiträge: 213
- Registriert: 13.07.2008 10:05
- Computerausstattung: Windows 8.1 Pro
AMD Phenom II X4 955 @ 3.2 GHz
4GB RAM
NVIDIA GeForce GTX 660
Re: Kreisrunde Menüs - Maussteuerung
So müsste es auch gehen.
Code: Alles auswählen
Procedure.f Winkel(x1.f, y1.f, x2.f, y2.f)
Protected w.f = ATan((y2 - y1) / (x2 - x1)) * 57.295776
If x2 < x1 : w = 180 + w : EndIf
If w < 0 : w + 360 : EndIf
If w > 360 : w - 360 : EndIf
ProcedureReturn w
EndProcedure
Windows 8.1 Pro 64Bit | AMD Phenom II X4 955 @ 3.2 GHz | 4GB RAM | NVIDIA GeForce GTX 660
Re: Kreisrunde Menüs - Maussteuerung
Danke ich probiers gleich aus!!Christian+ hat geschrieben:So müsste es auch gehen.Code: Alles auswählen
Procedure.f Winkel(x1.f, y1.f, x2.f, y2.f) Protected w.f = ATan((y2 - y1) / (x2 - x1)) * 57.295776 If x2 < x1 : w = 180 + w : EndIf If w < 0 : w + 360 : EndIf If w > 360 : w - 360 : EndIf ProcedureReturn w EndProcedure

-EDIT-
Funktioniert 1A großes Dankeschön

"I became insane, with long intervals of horrible sanity." - Edgar A. Poe