Skip to content

anim-format (runtime format) / cosSin

Function: cosSin() ​

ts
function cosSin(deg): [number, number];

cos / sin of degrees — exact for multiples of 90° (no Math.cos rounding: deterministic everywhere); other angles use Math.cos / sin

Parameters ​

ParameterType
degnumber

Returns ​

[number, number]

HereSplash — 2D animation for the web