本文整理汇总了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;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例6: tanh
function tanh($f)
{
return sinh($f) / cosh($f);
// ok, that one makes sense again :)
}
示例7: sinh
/**
* @param float $x A number
* @return float The hyperbolic sine of the given value
*/
public function sinh($x)
{
return sinh($x);
}
示例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===
示例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>';
示例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()
示例11: hyperbolicSine
/**
* @param int|float $number
*
* @return float
*/
function hyperbolicSine($number)
{
return (double) \sinh($number);
}
示例12: _sinh
private function _sinh($num)
{
return sinh((double) $num);
}
示例13: fromMercatorCoords
public static function fromMercatorCoords($point)
{
$point->x *= 360;
$point->y = rad2deg(atan(sinh($point->y)) * M_PI);
return $point;
}
示例14: sinh
public static function sinh($self, $a)
{
return sinh($a);
}
示例15: sinh
/**
* Calcula o seno hiperbólico do numero
* @return Number
*/
public function sinh()
{
$this->num = sinh($this->num);
return $this;
}