$elif deprecated.

This commit is contained in:
Christoffer Lerno
2023-03-20 16:54:45 +01:00
parent 02d073675a
commit 9c145996b0
19 changed files with 197 additions and 142 deletions

View File

@@ -407,13 +407,14 @@ macro sqrt(x) => $$sqrt(values::promote_int(x));
macro tan(x)
{
var $Type = $typeof(x);
$if (types::is_vector($Type))
$switch
$case types::is_vector($Type):
return $$sin(x) / $$cos(x);
$elif ($Type.typeid == float.typeid)
$case $Type.typeid == float.typeid:
return _tanf(x);
$else
$default:
return _tan(x);
$endif
$endswitch
}
/**