nRadianNumericRequired
Angle in radians.
AdvPL GuideTan(nRadian) -> nValueCalculates a trigonometric ratio from radians.
Receives radians; convert degrees first. Tangent is undefined at odd multiples of pi/2 and unstable nearby. This example uses 45 degrees, away from singularities, rather than testing at pi/2. (Sources: refs. 1–1.)
Tan(nRadian) -> nValuenRadianAngle in radians.
Numeric.
#Include "Protheus.ch"
User Function Ed687()
Local nRadians := 45 * 3.141592653589793 / 180
// Convert units before calling the function.
ConOut(Tan(nRadians))
Return NilApproximately 1, subject to numeric representation. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.