tanFunction top-level property
Implementation
final tanFunction = FunctionDefinition<num>(
name: 'tan',
parameters: [Parameter<num>(name: 'radians', presence: PresenceMandatory())],
function: (context) {
var radians = context.argumentValues['radians'] as num;
return Future.value(tan(radians));
},
documentation: FunctionDefinitionDocumentation(
description: 'Returns the the tangent of the radians',
examples: [
ExpressionBlockExample(
(delimiter) => '${delimiter.start}tan(7)${delimiter.end}',
shouldRender: tan(7).toString(),
),
TestFileExample.fromProjectFilePath(
'test/src/parser/expression/function/math/tan_test.dart',
),
],
),
);