public static lightSpeed ( ) : |
||
Résultat |
public static function lightSpeed()
{
if (self::$LightSpeed === null) {
self::$LightSpeed = Decimal::fromInteger(299792458);
}
return self::$LightSpeed;
}
public function testFiniteAbs() { $this->assertTrue(DecimalConstants::pi()->equals(Decimal::fromString("3.14159265358979323846264338327950"))); $this->assertTrue(DecimalConstants::eulerMascheroni()->equals(Decimal::fromString("0.57721566490153286060651209008240"))); $this->assertTrue(DecimalConstants::goldenRatio()->equals(Decimal::fromString("1.61803398874989484820458683436564"))); $this->assertTrue(DecimalConstants::lightSpeed()->equals(Decimal::fromInteger(299792458))); }