cos, sin, tan
This commit is contained in:
parent
6fd5e65376
commit
a2124faebc
|
@ -242,6 +242,10 @@ export const Primitives: Environment<any> = {
|
|||
'%'(a, b) { return [(a as number) % (b as number)]; },
|
||||
'neg'(v) { return [-(v as number)]; },
|
||||
|
||||
'cos'(n) { return [Math.cos(n as number)]; },
|
||||
'sin'(n) { return [Math.sin(n as number)]; },
|
||||
'tan'(n) { return [Math.tan(n as number)]; },
|
||||
|
||||
'to'() {
|
||||
const n_or_ns = this.nextToken('to', (v: any): v is (symbol | symbol[]) =>
|
||||
typeof v === 'symbol' || (Array.isArray(v) && v.every(w => typeof w === 'symbol')));
|
||||
|
|
Loading…
Reference in New Issue