THE HYPERCARD CENTER

 HyperTalk Reference
 Home » HyperTalk Reference » Functions Select a destination << Home Stack < HyperTalk Reference absannuityatanaveragecharToNumclickChunkclickH and clickVclickLineclickLocclickTextcommandKeycompoundcosdatedestinationdiskSpaceexp, exp1, exp2foundChunkfoundFieldfoundLinefoundTextheapSpacelengthln, ln1, log2maxmenusminmousemouseClickmouseH and mouseVmouseLocnumbernumToCharoffsetoptionKeyparamparamCountparamsprogramsrandomresultroundscreenRectsecondsselectedButtonselectedChunkselectedFieldselectedLineselectedLocselectedTextshiftKeysinsoundsqrtstacksstackSpacesumsystemVersiontantargettickstimetooltruncvaluewindows

# cos

```the cos of number ``` Value returned: number equal to the trigonometric cosine of` number `expressed in radians

Note: There are 2 * pi radians in 360 degrees.

## Examples

```the cos of 0 -- returns 1 the cos of pi -- returns -1 the cos of pi / 2 -- returns -.5 the cos of (pi / 2) -- returns 0```

## Placeholders

number
An expression that evaluates to a number.

For example:

```169 / 19 pi (60.625 * 500) average(1,4,5,10) i+1 -- (where i is a number) line 1 of fld "Debits"```

Note: Formally, HyperCard distinguishes between factors (simple values) and expressions. The difference between factors and expression matters only if you like to drop parentheses. Most functions take factors as their parameters, which is why` abs of -10 + 2 `returns` 12 `and `abs of (-10 + 2) `returns` 8`. In short, always use parentheses to group things the way you want them to evaluate, and you won’t have to worry about the difference between factors and expressions.

## Related Topics

Version 0.7b1 (March 24, 2022)

Switch to Modern View

HyperTalk Reference
 Home » HyperTalk Reference » Functions Select a destination << Home Stack < HyperTalk Reference absannuityatanaveragecharToNumclickChunkclickH and clickVclickLineclickLocclickTextcommandKeycompoundcosdatedestinationdiskSpaceexp, exp1, exp2foundChunkfoundFieldfoundLinefoundTextheapSpacelengthln, ln1, log2maxmenusminmousemouseClickmouseH and mouseVmouseLocnumbernumToCharoffsetoptionKeyparamparamCountparamsprogramsrandomresultroundscreenRectsecondsselectedButtonselectedChunkselectedFieldselectedLineselectedLocselectedTextshiftKeysinsoundsqrtstacksstackSpacesumsystemVersiontantargettickstimetooltruncvaluewindows

# cos

```the cos of number ``` Value returned: number equal to the trigonometric cosine of` number `expressed in radians

Note: There are 2 * pi radians in 360 degrees.

## Examples

```the cos of 0 -- returns 1 the cos of pi -- returns -1 the cos of pi / 2 -- returns -.5 the cos of (pi / 2) -- returns 0```

## Placeholders

number
An expression that evaluates to a number.

For example:

```169 / 19 pi (60.625 * 500) average(1,4,5,10) i+1 -- (where i is a number) line 1 of fld "Debits"```

Note: Formally, HyperCard distinguishes between factors (simple values) and expressions. The difference between factors and expression matters only if you like to drop parentheses. Most functions take factors as their parameters, which is why` abs of -10 + 2 `returns` 12 `and `abs of (-10 + 2) `returns` 8`. In short, always use parentheses to group things the way you want them to evaluate, and you won’t have to worry about the difference between factors and expressions.

## Related Topics

Version 0.7b1 (March 24, 2022)

Switch to Retro View