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

EMAT   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 31
ccs 8
cts 8
cp 1
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A even() 0 8 2
A exp() 0 3 1
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