Source for file svgGrapher.internal.findRange.php
Documentation is available at svgGrapher.internal.findRange.php
* Plugin internal findRange.
* @version $Id: svgGrapher.internal.findRange.php,v 1.3 2007/10/17 23:04:23 geelweb Exp $
* @author Guillaume L. <guillaume@geelweb.org>
* @copyright Copyright © 2006, Guillaume Luchet.
* @license http://opensource.org/licenses/bsd-license.php BSD License
* svgGrapher_internal_findRange()
* Get the range for data.
* @param array $data Array of data.
* @param integer $min Minimum accetable value.
* @param integer $max Maximum acceptable value.
* @param integer $resolution Approximation level of the max value.
return array('min' =>
0, 'max' =>
0, 'delta' =>
0);
foreach ($data as $key =>
$value) {
$factorMax = - pow(10, (floor(log10(abs($max)))));
$factorMin = - pow(10, (floor(log10(abs($min)))));*/
$max =
$factorMax *
ceil($max /
$factorMax);
$min =
$factorMin *
floor($min /
$factorMin);
return array('min' =>
$min, 'max' =>
$max, 'delta' =>
$delta);
Documentation generated on Tue, 23 Oct 2007 11:32:09 +0200 by phpDocumentor 1.4.0