Campbell CR800 Spécifications Page 233

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 324
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 232
Section 8. Processing and Math Instructions
Sgn (Number)
Used to find the sign value of a number.
Syntax
x = Sgn (number)
Remarks
Returns an integer indicating the sign of a number.
The argument number can be any valid numeric expression. Its sign
determines the value returned by the Sgn function:
If X > 0, then Sgn(X) = 1.
If X = 0, then Sgn(X) = 0.
If X < 0, then Sgn(X) = -1.
Sgn Function Example
The example uses Sgn to determine the sign of a number.
Dim Msg, Number 'Declare variables.
Number = Volt(1) 'Get user input.
Select Case Sgn(Number) 'Evaluate Number.
Case 0 'Zero.
Msg = 0
Case 1 'Positive.
Msg = 1
Case -1 'Negative.
Msg = -1
End Select
Sin (Angle)
Returns the sine of an angle.
Syntax
x = Sin (angle)
Remarks
Source can be any valid numeric expression measured in radians.
The Sin function takes an angle and returns the ratio of two sides of a right
triangle. The ratio is the length of the side opposite the angle divided by the
length of the hypotenuse.
The result lies in the range -1 to 1.
To convert degrees to radians, multiply degrees by π/180. To convert radians
to degrees, multiply radians by 180/π.
Returns the sine of the value in parentheses. The input must be in radians.
8-31
Vue de la page 232
1 2 ... 228 229 230 231 232 233 234 235 236 237 238 ... 323 324

Commentaires sur ces manuels

Pas de commentaire