Perseus
Preparing search index...
@khanacademy/kas
Trig
Class Trig
Hierarchy (
View Summary
)
Expr
Trig
Index
Constructors
constructor
Properties
arg
exp?
func
functions
hints
type
Methods
abs
add
Hint
args
as
Mul
as
Positive
Factor
as
Tex
codegen
collect
compare
compile
complete
Parse
construct
equals
eval
expand
expr
Args
factor
find
GCD
get
Consts
get
Denominator
get
Units
get
Vars
has
is
is
Basic
is
Divide
is
Even
is
Inverse
is
Negative
is
Positive
is
Root
is
Simplified
is
Subtract
name
needs
Explicit
Mul
negate
normalize
partial
Eval
print
raise
To
The
recurse
repr
same
Form
simplify
strip
tex
tex
Split
cos
cosh
create
sin
sinh
Constructors
constructor
new
Trig
(
type
:
string
,
arg
:
Expr
)
:
Trig
Parameters
type
:
string
arg
:
Expr
Returns
Trig
Properties
arg
arg
:
Expr
Optional
exp
exp
?:
Expr
func
func
:
typeof
Trig
= Trig
functions
functions
:
Record
<
string
,
TrigFunc
>
= ...
hints
hints
:
Hints
type
type
:
string
Methods
abs
abs
()
:
Expr
Returns
Expr
add
Hint
addHint
(
hint
:
keyof
Hints
)
:
any
Parameters
hint
:
keyof
Hints
Returns
any
args
args
()
:
(
string
|
Expr
)
[]
Returns (
string
|
Expr
)
[]
as
Mul
asMul
()
:
Mul
Returns
Mul
as
Positive
Factor
asPositiveFactor
()
:
Expr
Returns
Expr
as
Tex
asTex
(
options
:
any
)
:
string
Parameters
options
:
any
Returns
string
codegen
codegen
()
:
string
Returns
string
collect
collect
(
options
?:
Options
)
:
Expr
Parameters
Optional
options
:
Options
Returns
Expr
compare
compare
(
other
:
Expr
)
:
boolean
Parameters
other
:
Expr
Returns
boolean
compile
compile
()
:
(
vars
:
Expr
[]
)
=>
string
Returns
(
vars
:
Expr
[]
)
=>
string
complete
Parse
completeParse
()
:
Expr
Returns
Expr
construct
construct
(
args
:
any
[]
)
:
any
Parameters
args
:
any
[]
Returns
any
equals
equals
(
other
:
Expr
)
:
boolean
Parameters
other
:
Expr
Returns
boolean
eval
eval
(
vars
?:
Vars
,
options
?:
ParseOptions
)
:
number
Parameters
vars
:
Vars
= {}
Optional
options
:
ParseOptions
Returns
number
expand
expand
()
:
any
Returns
any
expr
Args
exprArgs
()
:
Expr
[]
Returns
Expr
[]
factor
factor
(
options
:
any
)
:
Expr
Parameters
options
:
any
Returns
Expr
find
GCD
findGCD
(
factor
:
Expr
)
:
Expr
Parameters
factor
:
Expr
Returns
Expr
get
Consts
getConsts
()
:
any
[]
Returns
any
[]
get
Denominator
getDenominator
()
:
Expr
Returns
Expr
get
Units
getUnits
()
:
any
[]
Returns
any
[]
get
Vars
getVars
(
excludeFunc
?:
boolean
)
:
any
[]
Parameters
Optional
excludeFunc
:
boolean
Returns
any
[]
has
has
(
func
:
any
)
:
boolean
Parameters
func
:
any
Returns
boolean
is
is
(
func
:
any
)
:
boolean
Parameters
func
:
any
Returns
boolean
is
Basic
isBasic
()
:
boolean
Returns
boolean
is
Divide
isDivide
()
:
boolean
Returns
boolean
is
Even
isEven
()
:
boolean
Returns
boolean
is
Inverse
isInverse
()
:
boolean
Returns
boolean
is
Negative
isNegative
()
:
boolean
Returns
boolean
is
Positive
isPositive
()
:
boolean
Returns
boolean
is
Root
isRoot
()
:
boolean
Returns
boolean
is
Simplified
isSimplified
()
:
boolean
Returns
boolean
is
Subtract
isSubtract
()
:
boolean
Returns
boolean
name
name
()
:
string
Returns
string
needs
Explicit
Mul
needsExplicitMul
()
:
boolean
Returns
boolean
negate
negate
()
:
Expr
Returns
Expr
normalize
normalize
()
:
Expr
Returns
Expr
partial
Eval
partialEval
(
vars
:
Vars
)
:
Expr
Parameters
vars
:
Vars
Returns
Expr
print
print
()
:
string
Returns
string
raise
To
The
raiseToThe
(
exp
:
Expr
,
options
?:
{
preciseFloats
?:
boolean
}
)
:
Expr
Parameters
exp
:
Expr
Optional
options
:
{
preciseFloats
?:
boolean
}
Returns
Expr
recurse
recurse
(
method
:
string
,
...
passed
:
any
[]
)
:
this
Parameters
method
:
string
...
passed
:
any
[]
Returns
this
repr
repr
()
:
string
Returns
string
same
Form
sameForm
(
other
:
Expr
)
:
boolean
Parameters
other
:
Expr
Returns
boolean
simplify
simplify
(
options
?:
Options
)
:
any
Parameters
Optional
options
:
Options
Returns
any
strip
strip
()
:
Expr
Returns
Expr
tex
tex
()
:
string
Returns
string
tex
Split
texSplit
()
:
[
func
:
string
,
arg
:
string
]
Returns
[
func
:
string
,
arg
:
string
]
Static
cos
cos
(
arg
:
Expr
)
:
Trig
Parameters
arg
:
Expr
Returns
Trig
Static
cosh
cosh
(
arg
:
Expr
)
:
Trig
Parameters
arg
:
Expr
Returns
Trig
Static
create
create
(
pair
:
any
,
arg
:
any
)
:
Trig
Parameters
pair
:
any
arg
:
any
Returns
Trig
Static
sin
sin
(
arg
:
Expr
)
:
Trig
Parameters
arg
:
Expr
Returns
Trig
Static
sinh
sinh
(
arg
:
Expr
)
:
Trig
Parameters
arg
:
Expr
Returns
Trig
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
arg
exp
func
functions
hints
type
Methods
abs
add
Hint
args
as
Mul
as
Positive
Factor
as
Tex
codegen
collect
compare
compile
complete
Parse
construct
equals
eval
expand
expr
Args
factor
find
GCD
get
Consts
get
Denominator
get
Units
get
Vars
has
is
is
Basic
is
Divide
is
Even
is
Inverse
is
Negative
is
Positive
is
Root
is
Simplified
is
Subtract
name
needs
Explicit
Mul
negate
normalize
partial
Eval
print
raise
To
The
recurse
repr
same
Form
simplify
strip
tex
tex
Split
cos
cosh
create
sin
sinh
Perseus
Loading...