Einzelnen Beitrag anzeigen

Niko

Registriert seit: 23. Jun 2003
416 Beiträge
 
Delphi 2006 Professional
 
#8

Re: Problem mit Dart-Programm

  Alt 17. Apr 2004, 17:17
@phlux :
Zitat von Niko:
Du brauchst dazu nur die Koordinaten des Treffers, des Scheibenmittelpunkts und die Radien der Ringe.
Aber hier noch als Nachtrag die Umsetzung:
Delphi-Quellcode:
Radius := Hypot(Mittelpunkt.x - Treffer.x, Mittelpunkt.y - Treffer.y);
if Radius <= RRing1 then
  Punkte := 100
else if Radius <= RRing2 then
  Punkte := 120
else if //...
"Electricity is actually made up of extremely tiny particles called electrons, that you cannot see with the naked eye unless you have been drinking." (Dave Barry)
  Mit Zitat antworten Zitat