C
Chua Wen Ching
Hi there. I need some help here.
I am trying to convert a sample application for learning
purposes. But i am stuck to see this:
Select Case ShipPitchSM
Case Is > 0
ShipPitchSM = ShipPitchSM -
Friction
If ShipPitchSM < 0 Then
ShipPitchSM = 0
If ShipPitchSM > 0.03 Then
ShipPitchSM = 0.03
Case Is < 0
ShipPitchSM = ShipPitchSM
+ Friction
If ShipPitchSM > 0 Then
ShipPitchSM = 0
If ShipPitchSM < -0.03
Then ShipPitchSM = -0.03
End Select
Select Case ShipYawSM
Case Is > 0
ShipYawSM = ShipYawSM -
Friction
If ShipYawSM < 0 Then
ShipYawSM = 0
If ShipYawSM > 0.03 Then
ShipYawSM = 0.03
Case Is < 0
ShipYawSM = ShipYawSM +
Friction
If ShipYawSM > 0 Then
ShipYawSM = 0
If ShipYawSM < -0.03 Then
ShipYawSM = -0.03
End Select
Select Case ShipRollSM
Case Is > 0
ShipRollSM = ShipRollSM -
Friction
If ShipRollSM < 0 Then
ShipRollSM = 0
If ShipRollSM > 0.03 Then
ShipRollSM = 0.03
Case Is < 0
ShipRollSM = ShipRollSM +
Friction
If ShipRollSM > 0 Then
ShipRollSM = 0
If ShipRollSM < -0.03 Then
ShipRollSM = -0.03
End Select
Any help?
How do you code that in c#? I try my best to place
conditions in case statements, but compile errors.
Thanks.
Regards,
Chua Wen Ching
I am trying to convert a sample application for learning
purposes. But i am stuck to see this:
Select Case ShipPitchSM
Case Is > 0
ShipPitchSM = ShipPitchSM -
Friction
If ShipPitchSM < 0 Then
ShipPitchSM = 0
If ShipPitchSM > 0.03 Then
ShipPitchSM = 0.03
Case Is < 0
ShipPitchSM = ShipPitchSM
+ Friction
If ShipPitchSM > 0 Then
ShipPitchSM = 0
If ShipPitchSM < -0.03
Then ShipPitchSM = -0.03
End Select
Select Case ShipYawSM
Case Is > 0
ShipYawSM = ShipYawSM -
Friction
If ShipYawSM < 0 Then
ShipYawSM = 0
If ShipYawSM > 0.03 Then
ShipYawSM = 0.03
Case Is < 0
ShipYawSM = ShipYawSM +
Friction
If ShipYawSM > 0 Then
ShipYawSM = 0
If ShipYawSM < -0.03 Then
ShipYawSM = -0.03
End Select
Select Case ShipRollSM
Case Is > 0
ShipRollSM = ShipRollSM -
Friction
If ShipRollSM < 0 Then
ShipRollSM = 0
If ShipRollSM > 0.03 Then
ShipRollSM = 0.03
Case Is < 0
ShipRollSM = ShipRollSM +
Friction
If ShipRollSM > 0 Then
ShipRollSM = 0
If ShipRollSM < -0.03 Then
ShipRollSM = -0.03
End Select
Any help?
How do you code that in c#? I try my best to place
conditions in case statements, but compile errors.
Thanks.
Regards,
Chua Wen Ching