Name
Cos Function
Syntax
function Cos(Number: Floating-point type
): Extended;
Description
The Cos
function computes and returns the
cosine of Number
, which is an angle in radians.
The Cos
function is built-in.
Tips and Tricks
Delphi automatically converts
Integer
andVariant
arguments to floating-point. To convert anInt64
argument to floating-point, add 0.0.If
Number
is a signaling NaN, positive infinity, or negative infinity, Delphi raises runtime error 6 (EInvalidOp
).If
Number
is a quiet NaN, the result isNumber
.
See Also
ArcTan Function, Sin Function |
Get Delphi in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.