/** * This method returns the hyperbolic tangent of this object's value. * * @access public * @static * @param IReal\Type $x the operand * @return IDouble\Type the result */ public static function tanh(IReal\Type $x) : IDouble\Type { return IDouble\Type::box(tanh($x->unbox())); }
/** * This method returns the value in radians. * * @access public * @static * @param IDouble\Type $x the object to be converted * @return IDouble\Type the value as a IDouble */ public static function toRadian(IDouble\Type $x) : IDouble\Type { return IDouble\Type::box(rad2deg($x->unbox())); }
/** * This method tests the "isNegative" method. * * @dataProvider data_isNegative */ public function test_isNegative(array $provided, array $expected) { $p0 = IDouble\Module::isNegative(IDouble\Type::box($provided[0])); $e0 = $expected[0]; $this->assertInstanceOf('\\Saber\\Data\\IBool\\Type', $p0); $this->assertSame($e0, $p0->unbox()); }
/** * This method tests the "toString" method. * * @dataProvider data_toString */ public function test_toString(array $provided, array $expected) { $p0 = IDouble\Type::box($provided[0])->toString(); $e0 = $expected[0]; $this->assertInstanceOf('\\Saber\\Data\\IString\\Type', $p0); $this->assertSame($e0, $p0->unbox()); }