ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
sinh.php
Go to the documentation of this file.
1 <?php
2 
10 namespace Complex;
11 
19 if (!function_exists(__NAMESPACE__ . '\\sinh')) {
20  function sinh($complex): Complex
21  {
22  $complex = Complex::validateComplexArgument($complex);
23 
24  if ($complex->isReal()) {
25  return new Complex(\sinh($complex->getReal()));
26  }
27 
28  return new Complex(
29  \sinh($complex->getReal()) * \cos($complex->getImaginary()),
30  \cosh($complex->getReal()) * \sin($complex->getImaginary()),
31  $complex->getSuffix()
32  );
33  }
34 }