当前位置: 首页>>代码示例>>PHP>>正文


PHP sinh函数代码示例

本文整理汇总了PHP中sinh函数的典型用法代码示例。如果您正苦于以下问题:PHP sinh函数的具体用法?PHP sinh怎么用?PHP sinh使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了sinh函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: HyperbolicArc

 function HyperbolicArc($p, $a, $b, $t1, $t2 = 0.0, $n, $reflectx = FALSE, $reflecty = FALSE)
 {
     if (empty($n)) {
         $n = $this->N();
     }
     if (empty($t2)) {
         $t2 = $t1;
         $t1 = -$t2;
     }
     //Circles
     if (!is_array($r)) {
         $r = array($r, $r);
     }
     $dt = ($t2 - $t1) / (1.0 * ($n - 1));
     $factx = 1.0;
     if ($reflectx) {
         $factx = -1.0;
     }
     $facty = 1.0;
     if ($reflecty) {
         $facty = -1.0;
     }
     $ps = array();
     $t = $t1;
     for ($i = 0; $i < $n; $i++) {
         array_push($ps, array($p[0] + $factx * $a * cosh($t), $p[1] + $factx * $b * sinh($t)));
         $t += $dt;
     }
     return $ps;
 }
开发者ID:olesmith,项目名称:poops,代码行数:30,代码来源:Curves.php

示例2: get_tile_nw

 public static function get_tile_nw($xtile, $ytile, $zoom)
 {
     $n = pow(2, $zoom);
     $lon = $xtile / $n * 360.0 - 180.0;
     $lat = rad2deg(atan(sinh(pi() * (1 - 2 * $ytile / $n))));
     return array($lat, $lon);
 }
开发者ID:hkilter,项目名称:OpenSupplyChains,代码行数:7,代码来源:tiles.php

示例3: getPoint

function getPoint($xtile, $ytile, $zoom)
{
    $n = pow(2, $zoom);
    $lon_deg = $xtile / $n * 360.0 - 180.0;
    $lat_deg = rad2deg(atan(sinh(pi() * (1 - 2 * $ytile / $n))));
    return $lon_deg . "," . $lat_deg;
}
开发者ID:vitalcrazz,项目名称:OSMPublicTransport,代码行数:7,代码来源:get_json_tile.php

示例4: inverse

 public function inverse($p)
 {
     $x = $p->x;
     $y = $p->y;
     $L = atan(Proj4php::$common . sinh(($x - $this->xs) / $this->n2) / cos(($y - $this->ys) / $this->n2));
     $lat1 = asin(sin(($y - $this->ys) / $this->n2) / Proj4php::$common . cosh(($x - $this->xs) / $this->n2));
     $LC = Proj4php::$common . latiso(0.0, $lat1, sin($lat1));
     $p->x = $this->lc + $L / $this->rs;
     $p->y = Proj4php::$common . invlatiso($this->e, ($LC - $this->cp) / $this->rs);
     return $p;
 }
开发者ID:Tjoosten,项目名称:input,代码行数:11,代码来源:gstmerc.php

示例5: wgs2u1992

function wgs2u1992($lat, $lon)
{
    //double Brad , Lrad, Lorad ,k, C, firad, Xmer, Ymer, Xgk, Ygk;
    // stale
    $E = 0.0818191910428;
    $Pi = 3.141592653589793;
    $Pi_2 = 1.570796327;
    //3.141592653589793238462643 / 2  // Pi / 2
    $Pi_4 = 0.7853981634;
    // 3.141592653589793238462643 / 4  // Pi / 4
    $Pi__180 = 0.01745329252;
    // 3.141592653589793238462643 / 180
    $Ro = 6367449.14577;
    $a2 = 0.0008377318247344;
    $a4 = 7.608527788826E-7;
    $a6 = 1.197638019173E-9;
    $a8 = 2.44337624251E-12;
    // uklad UTM
    //#define mo  0.9996   //wspo#udnik skali na po#udniku #rodkowym
    //#define Lo  (double)((((int)(lon/6)) * 6) + 3) // po#udnik #rodkowy
    // zone = (int)(lon+180/6)+1
    //#define FE  500000   //False Easting
    //#define FN  0 //False Northing
    // uklad 1992
    $mo = 0.9993;
    //wspo#udnik #rodkowy
    $Lo = 19.0;
    $FE = 500000;
    //False Easting
    $FN = -5300000;
    //False Northing
    $Brad = $lat * $Pi / 180;
    //Pi / 180;
    $Lrad = $lon * $Pi / 180;
    // Pi / 180;
    $Lorad = $Lo * $Pi / 180;
    // Pi / 180;
    //k = ((1 - E * sin(Brad)) / (1 + E * sin(Brad))) ^ (E / 2); // pasc
    //k = pow(((1 - E * sin(Brad)) / (1 + E * sin(Brad))) , (E / 2)); // c
    $k = exp($E / 2 * log((1 - $E * sin($Brad)) / (1 + $E * sin($Brad))));
    $C = $k * tan($Brad / 2 + $Pi_4);
    $firad = 2 * atan($C) - $Pi_2;
    $Xmer = atan(sin($firad) / (cos($firad) * cos($Lrad - $Lorad)));
    $Ymer = 0.5 * log((1 + cos($firad) * sin($Lrad - $Lorad)) / (1 - cos($firad) * sin($Lrad - $Lorad)));
    $Xgk = $Ro * ($Xmer + $a2 * sin(2 * $Xmer) * cosh(2 * $Ymer) + $a4 * sin(4 * $Xmer) * cosh(4 * $Ymer) + $a6 * sin(6 * $Xmer) * cosh(6 * $Ymer) + $a8 * sin(8 * $Xmer) * cosh(8 * $Ymer));
    $Ygk = $Ro * ($Ymer + $a2 * cos(2 * $Xmer) * sinh(2 * $Ymer) + $a4 * cos(4 * $Xmer) * sinh(4 * $Ymer) + $a6 * cos(6 * $Xmer) * sinh(6 * $Ymer) + $a8 * cos(8 * $Xmer) * sinh(8 * $Ymer));
    $X = $mo * $Xgk + $FN;
    $Y = $mo * $Ygk + $FE;
    return array($X, $Y);
}
开发者ID:pawelzielak,项目名称:opencaching-pl,代码行数:50,代码来源:wgs21992.php

示例6: tanh

 function tanh($f)
 {
     return sinh($f) / cosh($f);
     // ok, that one makes sense again :)
 }
开发者ID:ateliee,项目名称:php_lib,代码行数:5,代码来源:upgrade.php

示例7: sinh

 /**
  * @param float $x A number
  * @return float The hyperbolic sine of the given value
  */
 public function sinh($x)
 {
     return sinh($x);
 }
开发者ID:neos,项目名称:flow-development-collection,代码行数:8,代码来源:MathHelper.php

示例8: define

<?php

define("MAX_64Bit", 9223372036854775807);
define("MAX_32Bit", 2147483647);
define("MIN_64Bit", -9223372036854775807 - 1);
define("MIN_32Bit", -2147483647 - 1);
$longVals = array(MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit, MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, MAX_32Bit * 2 + 1, MAX_32Bit * 2 - 1, MAX_64Bit - 1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1);
foreach ($longVals as $longVal) {
    echo "--- testing: {$longVal} ---\n";
    var_dump(sinh($longVal));
}
?>
===DONE===
开发者ID:badlamer,项目名称:hhvm,代码行数:13,代码来源:sinh_basiclong_64bit.php

示例9: human_filesize

</div>

<div id="details">

<?php 
function human_filesize($bytes, $decimals = 2)
{
    $sz = ' kMGTP';
    $factor = floor((strlen($bytes) - 1) / 3);
    return sprintf("%.{$decimals}f ", $bytes / pow(1000, $factor)) . @$sz[$factor];
}
$file = $base . $z . "/" . $x . "/" . $y . ".png";
$imagesize = getimagesize($file);
$n = pow(2, $z);
$lon_deg = $x / $n * 360.0 - 180.0;
$lat_deg = rad2deg(atan(sinh(pi() * (1 - 2 * $y / $n))));
$runlog = "../log/run_" . $x . "_" . $y . ".log";
$gclog = "../log/gc_" . $x . "_" . $y . ".log";
$hproflog = "../log/hprof_" . $x . "_" . $y . ".log";
$pbffile = "../../input/old/tiles_z13_" . $x . "_" . $y . ".pbf";
$loglist = "";
if (file_exists($runlog)) {
    $loglist .= '<a href="' . $runlog . '">run</a>';
} else {
    $loglist .= '<span class="inactive">run</span>';
}
$loglist .= ", ";
if (file_exists($gclog)) {
    $loglist .= '<a href="' . $gclog . '">gc</a>';
} else {
    $loglist .= '<span class="inactive">gc</span>';
开发者ID:kyroskoh,项目名称:TileServerScripts,代码行数:31,代码来源:browse.php

示例10: IMSIN

	/**
	 * IMSIN
	 *
	 * Returns the sine of a complex number in x + yi or x + yj text format.
	 *
	 * Excel Function:
	 *		IMSIN(complexNumber)
	 *
	 * @param	string		$complexNumber	The complex number for which you want the sine.
	 * @return	string|float
	 */
	public static function IMSIN($complexNumber) {
		$complexNumber	= PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber);

		$parsedComplex = self::_parseComplex($complexNumber);

		if ($parsedComplex['imaginary'] == 0.0) {
			return sin($parsedComplex['real']);
		} else {
			return self::COMPLEX(sin($parsedComplex['real']) * cosh($parsedComplex['imaginary']),cos($parsedComplex['real']) * sinh($parsedComplex['imaginary']),$parsedComplex['suffix']);
		}
	}	//	function IMSIN()
开发者ID:rmuyinda,项目名称:dms-1,代码行数:22,代码来源:Engineering.php

示例11: hyperbolicSine

/**
 * @param int|float $number
 *
 * @return float
 */
function hyperbolicSine($number)
{
    return (double) \sinh($number);
}
开发者ID:typedphp,项目名称:number-functions,代码行数:9,代码来源:NumberFunctions.php

示例12: _sinh

 private function _sinh($num)
 {
     return sinh((double) $num);
 }
开发者ID:pkdevbox,项目名称:FireKit,代码行数:4,代码来源:Calc.php

示例13: fromMercatorCoords

 public static function fromMercatorCoords($point)
 {
     $point->x *= 360;
     $point->y = rad2deg(atan(sinh($point->y)) * M_PI);
     return $point;
 }
开发者ID:markguinn,项目名称:silverstripe-gis,代码行数:6,代码来源:GoogleMapUtility.php

示例14: sinh

 public static function sinh($self, $a)
 {
     return sinh($a);
 }
开发者ID:r3sist,项目名称:MathScript,代码行数:4,代码来源:mathscript.class.php

示例15: sinh

 /**
  * Calcula o seno hiperbólico do numero
  * @return Number
  */
 public function sinh()
 {
     $this->num = sinh($this->num);
     return $this;
 }
开发者ID:laiello,项目名称:samusframework,代码行数:9,代码来源:Type_Number.php


注:本文中的sinh函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。