-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_Log_.php
More file actions
56 lines (50 loc) · 962 Bytes
/
_Log_.php
File metadata and controls
56 lines (50 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* _Chain_ ©2015 Julien <youlweb@hotmail.com>
* Refer to the LICENSE file for the full copyright and license information.
* @package chain/math
*/
namespace _Chain_\_Math_;
use _Chain_\_AbsLink_;
use _Chain_\I_O;
use _Chain_\Type;
/**
* _Log_
*
* @author Julien <youlweb@hotmail.com>
*/
class _Log_ extends _AbsLink_
{
/**
* @var float
*/
private $_base;
/**
* @param float $base Log base.
* {@link http://php.net/manual/en/function.log.php Defaults to 'e'}.
*/
public function __construct($base = M_E)
{
$this->_base = $base;
}
/**
* Logarithm function.
*
* I/O contract
* ------------
* <pre>
* I number
* O number
* X no
* </pre>
*
* @param I_O $IO
* @return I_O
*/
public function EXE(I_O $IO)
{
return $IO->_O(
log($IO->I_(Type::NUMBER), $this->_base)
);
}
}