linspace() public static method

Creates a vector (NumArray) from $low to $high with the size of $number
Since: 1.0.0
public static linspace ( float $low, float $high, integer $number ) : NumArray
$low float beginning of the vector
$high float end of the vector
$number integer size of the vector
return NumArray
コード例 #1
0
ファイル: NumPHPTest.php プロジェクト: buaa556/gongkesheng
 /**
  * Test if InvalidArgumentException will be thrown, when using NumPHP::linspace
  * with negative `$number`
  *
  * @expectedException        \NumPHP\Core\Exception\InvalidArgumentException
  * @expectedExceptionMessage Number has to be a positive value
  */
 public function testLinspaceInvalidArgumentException()
 {
     NumPHP::linspace(1.5, 4.5, -1);
 }