Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »


Contents:

NOTE:  Designer Cloud Powered by Trifacta Educational is a free product with limitations on its features. Some features in the documentation do not apply to this product edition. See Product Limitations.

   

Computes the degrees of an input value measuring the radians of an angle. The value can be a Decimal or Integer literal or a reference to a column containing numeric values.
  • Input units are in radians.
  • You can convert from degrees to radians. For more information, see RADIANS Function.

Basic Usage

Numeric literal example:

derive type:single value: ROUND(DEGREES(1.0000),4)

Output: Generates a column containing the computation in degrees of 1.0000 radians, which is 57.2728

Column reference example:

derive type:single value: DEGREES(myRads) as: myDegrees'

Output: Generates the new myDegrees column containing the conversion of the values in MyRads column to degrees. 

Syntax and Arguments

derive type:single value: DEGREES(numeric_value)

ArgumentRequired?Data TypeDescription
numeric_valueYstring, decimal, or integerName of column, Decimal or Integer literal, or function returning those types to apply to the function

For more information on syntax standards, see Language Documentation Syntax Notes.

numeric_value

Name of the column, Integer or Decimal literal, or function returning that data type to apply to the function.

  • Missing input values generate missing results.
  • Literal numeric values should not be quoted. Quoted values are treated as strings. 
  • Multiple columns and wildcards are not supported.

Usage Notes:

Required?Data TypeExample Value
YesString (column reference) or Integer or Decimal literal3.14

Examples


Tip: For additional examples, see Common Tasks.

Example - DEGREES and RADIANS functions

This example illustrates to convert values from one unit of measure to the other.

Functions:

ItemDescription
DEGREES Function Computes the degrees of an input value measuring the radians of an angle. The value can be a Decimal or Integer literal or a reference to a column containing numeric values.
RADIANS Function Computes the radians of an input value measuring degrees of an angle. The value can be a Decimal or Integer literal or a reference to a column containing numeric values.
ROUND Function Rounds input value to the nearest integer. Input can be an Integer, a Decimal, a column reference, or an expression. Optional second argument can be used to specify the number of digits to which to round.

Source:

In this example, the source data contains information about a set of isosceles triangles. Each triangle is listed in a separate row, with the listed value as the size of the non-congruent angle in the triangle in degrees.

You must calculate the measurement of all three angles of each isosceles triangle in radians.

trianglea01
t0130
t0260
t0390
t04120
t05150


Transformation:

You can convert the value for the non-congruent angle to radians using the following:

Transformation Name New formula
Parameter: Formula type Single row formula
Parameter: Formula ROUND(RADIANS(a01), 4)
Parameter: New column name 'r01'

Now, calculate the value in degrees of the remaining two angles, which are congruent. Since the sum of all angles in a triangle is 180, the following formula can be applied to compute the size in degrees of each of these angles:

Transformation Name New formula
Parameter: Formula type Single row formula
Parameter: Formula (180 - a01) / 2
Parameter: New column name 'a02'

Convert the above to radians:

Transformation Name New formula
Parameter: Formula type Single row formula
Parameter: Formula ROUND(RADIANS(a02), 4)
Parameter: New column name 'r02'

Create a second column for the other congruent angle:

Transformation Name New formula
Parameter: Formula type Single row formula
Parameter: Formula ROUND(RADIANS(a02), 4)
Parameter: New column name 'r03'

To check accuracy, you sum all three columns and convert to degrees:

Transformation Name New formula
Parameter: Formula type Single row formula
Parameter: Formula ROUND(RADIANS(a02), 4)
Parameter: New column name 'checksum'

Results:

After you delete the intermediate columns, you see the following results and determine the error in the checksum is acceptable:

trianglea01r03r02r01checksum
t01301.30951.30950.5238179.9967
t02601.04761.04761.0476179.9967
t03900.78570.78571.5714179.9967
t041200.52380.52382.0952179.9967
t051500.26190.26192.6190179.9967

See Also for EXAMPLE - DEGREES and RADIANS Functions:

See Also for DEGREES Function:

Error rendering macro 'contentbylabel'

parameters should not be empty

 

  • No labels

This page has no comments.