Class Acos
- Namespace
- YndigoBlue.Velocity.Functions
- Assembly
- YndigoBlue.Velocity.dll
Represents the ACOS (arccosine) inverse trigonometric function that calculates the angle whose cosine is the input.
public class Acos : Function, ICheckItem, IDefaultItem, IFilterItem, IElement
- Inheritance
-
Acos
- Implements
Remarks
The ACOS function calculates the arccosine (inverse cosine) of a value and returns an angle in radians. The input value must be between -1 and 1 (inclusive); values outside this range will produce an error. The result is an angle between 0 and pi radians. Use DEGREES to convert the result to degrees if needed. This is useful for angle calculations and inverse trigonometric operations.
Examples
Calculate the arccosine of each dot product result:
var schema = manager.LoadSchema("vectors");
var products = schema["dot_products"];
var query = new Query()
.Select([ products["id"], new Expression("angle_radians", new Acos(products["dot_value"])) ])
.From(products);
var results = manager.Retrieve(query);
Constructors
- Acos(IEnumerable<IElement>)
Initializes a new instance of ACOS for a composed expression (e.g. ACOS(col / divisor)).
- Acos(IElement)
Initializes a new instance of ACOS for any element.
- Acos(Column)
Initializes a new instance of ACOS for a column.
- Acos(Expression)
Initializes a new instance of ACOS for an expression.