@@ -38,64 +38,69 @@ private function __clone()
38
38
39
39
/**
40
40
* Returns the Pi number.
41
+ * @return Decimal
41
42
*/
42
43
public static function PI ()
43
44
{
44
- if (static ::$ PI === null ) {
45
- static ::$ PI = Decimal::fromString (
45
+ if (self ::$ PI === null ) {
46
+ self ::$ PI = Decimal::fromString (
46
47
"3.14159265358979323846264338327950 "
47
48
);
48
49
}
49
- return static ::$ PI ;
50
+ return self ::$ PI ;
50
51
}
51
52
52
53
/**
53
54
* Returns the Euler's E number.
55
+ * @return Decimal
54
56
*/
55
57
public static function E ()
56
58
{
57
- if (static ::$ E === null ) {
58
- static ::$ E = Decimal::fromString (
59
+ if (self ::$ E === null ) {
60
+ self ::$ E = Decimal::fromString (
59
61
"2.71828182845904523536028747135266 "
60
62
);
61
63
}
62
- return static ::$ E ;
64
+ return self ::$ E ;
63
65
}
64
66
65
67
/**
66
68
* Returns the Euler-Mascheroni constant.
69
+ * @return Decimal
67
70
*/
68
71
public static function EulerMascheroni ()
69
72
{
70
- if (static ::$ EulerMascheroni === null ) {
71
- static ::$ EulerMascheroni = Decimal::fromString (
73
+ if (self ::$ EulerMascheroni === null ) {
74
+ self ::$ EulerMascheroni = Decimal::fromString (
72
75
"0.57721566490153286060651209008240 "
73
76
);
74
77
}
75
- return static ::$ EulerMascheroni ;
78
+ return self ::$ EulerMascheroni ;
76
79
}
77
80
78
81
/**
79
82
* Returns the Golden Ration, also named Phi.
83
+ * @return Decimal
80
84
*/
81
85
public static function GoldenRatio ()
82
86
{
83
- if (static ::$ GoldenRatio === null ) {
84
- static ::$ GoldenRatio = Decimal::fromString (
87
+ if (self ::$ GoldenRatio === null ) {
88
+ self ::$ GoldenRatio = Decimal::fromString (
85
89
"1.61803398874989484820458683436564 "
86
90
);
87
91
}
88
- return static ::$ GoldenRatio ;
92
+ return self ::$ GoldenRatio ;
89
93
}
90
94
91
95
/**
92
96
* Returns the Light of Speed measured in meters / second.
97
+ * @return Decimal
93
98
*/
94
99
public static function LightSpeed ()
95
100
{
96
- if (static ::$ LightSpeed === null ) {
97
- static ::$ LightSpeed = Decimal::fromInteger (299792458 );
101
+ if (self ::$ LightSpeed === null ) {
102
+ self ::$ LightSpeed = Decimal::fromInteger (299792458 );
98
103
}
99
- return static ::$ LightSpeed ;
104
+ return selfgit ::$ LightSpeed ;
100
105
}
101
106
}
0 commit comments