<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.wbex.ru/index.php?action=history&amp;feed=atom&amp;title=PHP%2FMath%2FMath</id>
		<title>PHP/Math/Math - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.wbex.ru/index.php?action=history&amp;feed=atom&amp;title=PHP%2FMath%2FMath"/>
		<link rel="alternate" type="text/html" href="http://www.wbex.ru/index.php?title=PHP/Math/Math&amp;action=history"/>
		<updated>2026-04-09T16:44:50Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.wbex.ru/index.php?title=PHP/Math/Math&amp;diff=946&amp;oldid=prev</id>
		<title> в 10:37, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.wbex.ru/index.php?title=PHP/Math/Math&amp;diff=946&amp;oldid=prev"/>
				<updated>2010-05-26T10:37:31Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 10:37, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.wbex.ru/index.php?title=PHP/Math/Math&amp;diff=947&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.wbex.ru/index.php?title=PHP/Math/Math&amp;diff=947&amp;oldid=prev"/>
				<updated>2010-05-26T07:06:03Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Create and use a simple static Math() class==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
define(&amp;quot;RAND_MAX&amp;quot;, mt_getrandmax()); &lt;br /&gt;
class Math { &lt;br /&gt;
    static $pi = M_PI; &lt;br /&gt;
    static $e = M_E; &lt;br /&gt;
    static function pi() { &lt;br /&gt;
        return M_PI; &lt;br /&gt;
    } &lt;br /&gt;
    static function intval($val) { &lt;br /&gt;
        return intval($val); &lt;br /&gt;
    } &lt;br /&gt;
    static function floor($val) { &lt;br /&gt;
        return floor($val); &lt;br /&gt;
    } &lt;br /&gt;
    static function ceil($val) { &lt;br /&gt;
        return ceil($val); &lt;br /&gt;
    } &lt;br /&gt;
    static function round($val, $decimals = 0) { &lt;br /&gt;
        return round($val, $decimals); &lt;br /&gt;
    } &lt;br /&gt;
    static function abs($val) { &lt;br /&gt;
        return abs($val); &lt;br /&gt;
    } &lt;br /&gt;
    static function floatval($val) { &lt;br /&gt;
        return floatval($val); &lt;br /&gt;
    } &lt;br /&gt;
    static function rand($min = 0, $max = RAND_MAX) { &lt;br /&gt;
        return mt_rand($min, $max); &lt;br /&gt;
    } &lt;br /&gt;
    static function min($var1, $var2) { &lt;br /&gt;
        return min($var1, $var2); &lt;br /&gt;
    } &lt;br /&gt;
    static function max($var1, $var2) { &lt;br /&gt;
        return max($var1, $var2); &lt;br /&gt;
    } &lt;br /&gt;
} &lt;br /&gt;
$a = 3.5; &lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Math::\$pi = &amp;quot; . Math::$pi . &amp;quot;\n&amp;quot;; &lt;br /&gt;
echo &amp;quot;Math::\$e = &amp;quot; . Math::$e . &amp;quot;\n&amp;quot;; &lt;br /&gt;
echo &amp;quot;Math::intval($a) = &amp;quot; . Math::intval($a) . &amp;quot;\n&amp;quot;; &lt;br /&gt;
echo &amp;quot;Math::floor($a) = &amp;quot; . Math::floor($a) . &amp;quot;\n&amp;quot;; &lt;br /&gt;
echo &amp;quot;Math::ceil($a) = &amp;quot; . Math::ceil($a) . &amp;quot;\n&amp;quot;; &lt;br /&gt;
echo &amp;quot;Math::round(Math::\$pi, 2) = &amp;quot; . Math::round(Math::$pi, 2) . &amp;quot;\n&amp;quot;; &lt;br /&gt;
echo &amp;quot;Math::abs(-$a) = &amp;quot; . Math::abs(-$a) . &amp;quot;\n&amp;quot;; &lt;br /&gt;
echo &amp;quot;Math::floatval($a) = &amp;quot; . Math::floatval($a) . &amp;quot;\n&amp;quot;; &lt;br /&gt;
echo &amp;quot;Math::rand(5, 25) = &amp;quot; . Math::rand(5, 25) . &amp;quot;\n&amp;quot;; &lt;br /&gt;
echo &amp;quot;Math::rand() = &amp;quot; . Math::rand() . &amp;quot;\n&amp;quot;; &lt;br /&gt;
echo &amp;quot;Math::min(2, 28) = &amp;quot; . Math::min(3, 28) . &amp;quot;\n&amp;quot;; &lt;br /&gt;
echo &amp;quot;Math::max(3, 28) = &amp;quot; . Math::max(3, 28) . &amp;quot;\n&amp;quot;; &lt;br /&gt;
?&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Hyperbolic Functions==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Name           Description &lt;br /&gt;
cosh()         Hyperbolic cosine (exp(arg) + exp(-arg))/2 &lt;br /&gt;
sinh()         Hyperbolic sine (exp(arg) - exp(-arg))/2 &lt;br /&gt;
tanh()         Hyperbolic tangent sinh(arg)/cosh(arg) &lt;br /&gt;
acosh()        Inverse hyperbolic cosine &lt;br /&gt;
asinh()        Inverse hyperbolic sine &lt;br /&gt;
atanh()        Inverse hyperbolic tangent &lt;br /&gt;
&amp;lt;?php &lt;br /&gt;
$start = array(0, 0); &lt;br /&gt;
$end = array(100, 0); &lt;br /&gt;
$length = sqrt(pow($end[0] - $start[0], 2) + pow($end[1] - $start[1], 2)); &lt;br /&gt;
$angle = 35; &lt;br /&gt;
$r = deg2rad($angle); &lt;br /&gt;
$new_start = array(20, 20); &lt;br /&gt;
$new_end = array( $new_start[0] + cos($r) * $length, $new_start[1] + sin($r) * $length &lt;br /&gt;
); &lt;br /&gt;
var_dump($new_end); &lt;br /&gt;
?&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Math calculation==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;?&lt;br /&gt;
    $somevar = 5 + 5; // 10&lt;br /&gt;
    $somevar = 5 - 5; // 0&lt;br /&gt;
    $somevar = 5 + 5 - (5 + 5); // 0&lt;br /&gt;
    $somevar = 5 * 5; // 25&lt;br /&gt;
    $somevar = 10 * 5 - 5; // 45&lt;br /&gt;
    $somevar = $somevar . &amp;quot;appended to end&amp;quot;;&lt;br /&gt;
    $somevar = false;&lt;br /&gt;
    $somevar = !$somevar; // $somevar is now set to true&lt;br /&gt;
    $somevar = 5;&lt;br /&gt;
    $somevar++; // $somevar is now 6&lt;br /&gt;
    $somevar--; // $somevar is now 5 again&lt;br /&gt;
    ++$somevar; // $somevar is 6&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Mathematical constants==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Constant                    Value                                 Meaning&lt;br /&gt;
 &lt;br /&gt;
M_PI                        3.14159265358979323846                pi&lt;br /&gt;
 &lt;br /&gt;
M_PI_2                      1.57079632679489661923                pi/2&lt;br /&gt;
 &lt;br /&gt;
M_PI_4                      0.78539816339744830962                pi/4&lt;br /&gt;
 &lt;br /&gt;
M_1_PI                      0.31830988618379067154                1/pi&lt;br /&gt;
 &lt;br /&gt;
M_2_PI                      0.63661977236758134308                2/pi&lt;br /&gt;
 &lt;br /&gt;
M_SQRTPI                    1.77245385090551602729                sqrt(M_PI)&lt;br /&gt;
 &lt;br /&gt;
M_2_SQRTPI                  1.12837916709551257390                2/sqrt(M_PI)&lt;br /&gt;
 &lt;br /&gt;
M_SQRT2                     1.41421356237309504880                sqrt(2)&lt;br /&gt;
 &lt;br /&gt;
M_SQRT3                     1.73205080756887729352                sqrt(3)&lt;br /&gt;
 &lt;br /&gt;
M_SQRT1_2                   0.70710678118654752440                1/sqrt(2)&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Math operations==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;?&lt;br /&gt;
print 2 + 2;&lt;br /&gt;
print 17 - 3.5;&lt;br /&gt;
print 10 / 3;&lt;br /&gt;
print 6 * 9;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>