Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

Sin

Sin(nRadian) -> nValue

Calculates a trigonometric ratio from radians.

SinAdvPL
01 · OVERVIEW

Overview

Receives radians, not degrees. The example converts 30 degrees using pi/180. The result is approximately 0.5: floating-point comparisons need suitable tolerance. Sine does not calculate inverse sine. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

Sin(nRadian) -> nValue

Parameters

nRadian
NumericRequired

Angle in radians.

Return value

Numeric.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed664()
    Local nRadians := 30 * 3.141592653589793 / 180
    // Convert units before calling the function.
    ConOut(Sin(nRadians))
Return Nil
Expected result

Approximately 0.5, subject to numeric representation. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Validate the domain and precision required by the business calculation.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. Sin. Sintaxe e observações. TDN. Accessed on 2026-10-28.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha