l'angle que forme un point par rapport à un autrene signifie pas grand chose pour moi !
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionA (125,310) . \ \ \ \ \ D _________\________________ C 0 (250,620)
Function AngleBetween(ByVal a As Point, ByVal b As Point) As Single Dim dotProd As Single, lenProd As Single, divOperation As Single dotProd =(a.x * b.x) + (a.y * b.y) ' Fonction Dot 'Fonction Length(a): math.sqrt(a.X * a.X + a.Y *a.Y) lenProd = math.sqrt(a.X * a.X + a.Y * a.Y) * math.sqrt(b.X * b.X + b.Y * b.Y) divOperation = dotProd / lenProd Dim Res As Double = Math.Acos(divOperation) If (b.Y - a.Y) < 0 Then Res = Math.Pi + Math.Pi - Res Return Convert.ToSingle(Res) End Function