mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
cot function implemented
Pull Request resolved: 102 commit_hash:f2fa0c941525e9292059abe12f47ada077710ce3
This commit is contained in:
@@ -137,6 +137,20 @@
|
||||
"ios",
|
||||
"web"
|
||||
]
|
||||
},
|
||||
{
|
||||
"function_name": "cot",
|
||||
"doc": "Calculates the cotangent of the given angle in radians",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "number",
|
||||
"doc": "Angle in radians."
|
||||
}
|
||||
],
|
||||
"result_type": "number",
|
||||
"platforms": [
|
||||
"ios"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -351,6 +351,73 @@
|
||||
"ios",
|
||||
"web"
|
||||
]
|
||||
},
|
||||
{
|
||||
"expression": "@{cot(0.0)}",
|
||||
"expected": {
|
||||
"type": "error",
|
||||
"value": "Failed to evaluate [cot(0.0)]. Cotangent is undefined for the given value."
|
||||
},
|
||||
"platforms": [
|
||||
"ios"
|
||||
]
|
||||
},
|
||||
{
|
||||
"expression": "@{cot(pi())}",
|
||||
"expected": {
|
||||
"type": "error",
|
||||
"value": "Failed to evaluate [cot(3.141592653589793)]. Cotangent is undefined for the given value."
|
||||
},
|
||||
"platforms": [
|
||||
"ios"
|
||||
]
|
||||
},
|
||||
{
|
||||
"expression": "@{cot(pi() / 2)}",
|
||||
"expected": {
|
||||
"type": "number",
|
||||
"value": 0.0
|
||||
},
|
||||
"platforms": [
|
||||
"ios"
|
||||
]
|
||||
},
|
||||
{
|
||||
"expression": "@{cot(pi() / 4)}",
|
||||
"expected": {
|
||||
"type": "number",
|
||||
"value": 1.0
|
||||
},
|
||||
"platforms": [
|
||||
"ios"
|
||||
]
|
||||
},
|
||||
{
|
||||
"expression": "@{cot(-pi() / 4)}",
|
||||
"expected": {
|
||||
"type": "number",
|
||||
"value": -1.0
|
||||
},
|
||||
"platforms": [
|
||||
"ios"
|
||||
]
|
||||
},
|
||||
{
|
||||
"expression": "@{cot(var)}",
|
||||
"expected": {
|
||||
"type": "number",
|
||||
"value": 0.57735026919
|
||||
},
|
||||
"variables": [
|
||||
{
|
||||
"name": "var",
|
||||
"type": "number",
|
||||
"value": 1.0471975512
|
||||
}
|
||||
],
|
||||
"platforms": [
|
||||
"ios"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user