Class Cos
- Namespace
- YndigoBlue.Velocity.Functions
- Assembly
- YndigoBlue.Velocity.dll
Represents the COS (cosine) trigonometric function that calculates the cosine of an angle.
public class Cos : Function, ICheckItem, IDefaultItem, IFilterItem, IElement
- Inheritance
-
Cos
- Implements
Remarks
The COS function calculates the cosine of an angle specified in radians. The result is a value between -1 and 1. For angles in degrees, use RADIANS to convert before applying COS. This is useful for geometric calculations, circular motion, and mathematical modeling.
Examples
Calculate the cosine of each angle value in the measurements table:
var schema = manager.LoadSchema("geometry");
var angles = schema["angles"];
var query = new Query()
.Select([ angles["id"], new Expression("cosine_value", new Cos(angles["radians"])) ])
.From(angles);
var results = manager.Retrieve(query);
Constructors
- Cos(IEnumerable<IElement>)
Initializes a new instance of COS for a composed expression (e.g. COS(col * factor)).
- Cos(IElement)
Initializes a new instance of COS for any element.
- Cos(Column)
Initializes a new instance of COS for a column.
- Cos(Expression)
Initializes a new instance of COS for an expression.