GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Branch dev (ec2832)
by t
03:09
created

PMAT::pi()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
/**
3
 * Trait MathAndTrigonometry-P
4
 *
5
 * @link https://www.icy2003.com/
6
 * @author icy2003 <[email protected]>
7
 * @copyright Copyright (c) 2017, icy2003
8
 */
9
namespace icy2003\php\icomponents\excel\mathAndTrigonometry;
10
11
/**
12
 * MathAndTrigonometry-P
13
 */
14
trait PMAT
15
{
16
    /**
17
     * 数学常量 pi
18
     *
19
     * @return double
20
     */
21 1
    public static function pi()
22
    {
23 1
        return pi();
24
    }
25
26
    /**
27
     * 返回数字乘幂的结果
28
     *
29
     * @param double $number  必需。 基数。 可为任意实数
30
     * @param double $power 必需。 基数乘幂运算的指数
31
     *
32
     * @return double
33
     */
34 2
    public static function power($number, $power)
35
    {
36 2
        return pow($number, $power);
37
    }
38
39
    /**
40
     * PRODUCT函数将以参数形式给出的所有数字相乘
41
     *
42
     * @param double $number1 必需。 要相乘的第一个数字或范围
43
     *
44
     * @return double
45
     */
46 1
    public static function product($number1)
47
    {
48 1
        $numbers = is_array($number1) ? $number1 : func_get_args();
49 1
        return array_product($numbers);
50
    }
51
}
52