bonjour,
j'ai un prob avec un calcul de COS, je ne retrouve pas les bonne valeurs...
voici mon code
voici le resultat:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55 Imports System.Math Public Class Form1 Dim Angle, AdjConu, AdjPasConu As Double Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Label6.Text = "" Label7.Text = "" Label5.Visible = False TextBoxResult.Visible = False PictureBox1.BackgroundImage = My.Resources.image_1 End Sub Private Sub Cal() TextBoxRaynure.Text = 25 TextBoxCt.Text = 24.8 TextBoxPAS.Text = 180 TextBoxØ.Text = 200 PictureBox1.BackgroundImage = My.Resources.image Angle = TextBoxPAS.Text / (TextBoxØ.Text * PI) Angle = (Math.Atan(Angle)) * 180 / Math.PI AdjConu = Math.Cos(Angle) AdjConu = AdjConu * TextBoxRaynure.Text AdjPasConu = Math.Cos(Angle) AdjPasConu = AdjPasConu * TextBoxCt.Text TextBoxResult.Text = AdjConu - AdjPasConu Label6.Text = Angle Label7.Text = AdjConu Label5.Visible = True TextBoxResult.Visible = True End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Cal() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Close() End Sub End Class
Angle = 15.985890405379594
AdjConu = -24.040655511727724
AdjPasConu = -23.8483302676339
je devrais avoir:
Angle = 15.98589 ============================> OK
AdjConu = 24.0332 ===========================> FAUX
AdjPasConu = 23.5525 =========================> FAUX
si quelqu'un peu m'aider....
merci
Partager