Code: Alles auswählen
Procedure abstand(x1,y1,x2,y2)
xa=x1-x2
ya=y2-y2
If ya < 0
ya=ya*-1
EndIf
If xa < 0
xa=xa*-1
EndIf
ProcedureReturn Sqr(Pow(xa,2)*Pow(ya,2))
EndProcedure
Debug abstand(2,2,2,10)
Was ist falsch?
Code: Alles auswählen
Procedure abstand(x1,y1,x2,y2)
xa=x1-x2
ya=y2-y2
If ya < 0
ya=ya*-1
EndIf
If xa < 0
xa=xa*-1
EndIf
ProcedureReturn Sqr(Pow(xa,2)*Pow(ya,2))
EndProcedure
Debug abstand(2,2,2,10)
Code: Alles auswählen
If ya < 0
ya=ya*-1
EndIf
If xa < 0
xa=xa*-1
EndIf
Code: Alles auswählen
Procedure abstand(x1,y1,x2,y2)
xa=x1-x2
ya=y1-y2
ProcedureReturn Sqr(Pow(xa,2)+Pow(ya,2))
EndProcedure
Debug abstand(2,2,2,10)
Code: Alles auswählen
dist = Sqr(a*a+b*b)