mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Added trigonometric functions to code gen and builtins
This commit is contained in:
parent
c83a6dc7b8
commit
5c1c9efb89
6 changed files with 102 additions and 0 deletions
|
@ -463,6 +463,24 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
unique_function(vec![float_type(UVAR1)], float_type(UVAR2)),
|
||||
);
|
||||
|
||||
// sin : Float -> Float
|
||||
add_type(
|
||||
Symbol::FLOAT_SIN,
|
||||
unique_function(vec![float_type(UVAR1)], float_type(UVAR2)),
|
||||
);
|
||||
|
||||
// cos : Float -> Float
|
||||
add_type(
|
||||
Symbol::FLOAT_COS,
|
||||
unique_function(vec![float_type(UVAR1)], float_type(UVAR2)),
|
||||
);
|
||||
|
||||
// tan : Float -> Float
|
||||
add_type(
|
||||
Symbol::FLOAT_TAN,
|
||||
unique_function(vec![float_type(UVAR1)], float_type(UVAR2)),
|
||||
);
|
||||
|
||||
// highest : Float
|
||||
add_type(Symbol::FLOAT_HIGHEST, float_type(UVAR1));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue