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
Pull Request — master (#20)
by t
02:32
created

EMAT::exp()   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 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
/**
3
 * Trait MathAndTrigonometry-E
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-E
13
 */
14
trait EMAT
15
{
16
    /**
17
     * 返回数字向上舍入到的最接近的偶数
18
     *
19
     * - 数值总是向绝对值大的方向舍入
20
     *
21
     * @param double $number 必需。 要舍入的值
22
     *
23
     * @return integer
24
     */
25 1
    public static function even($number)
26
    {
27 1
        $sign = self::sign($number);
28 1
        $number = ceil(self::abs($number));
29 1
        if ($number % 2 == 1) {
30 1
            $number += 1;
31
        }
32 1
        return (int) ($sign * $number);
33
    }
34
35
    /**
36
     * 返回 e 的 n 次幂。 常数 e 等于 2.71828182845904,是自然对数的底数
37
     *
38
     * @param integer $number
39
     *
40
     * @return double
41
     */
42 3
    public static function exp($number)
43
    {
44 3
        return exp($number);
45
    }
46
}
47