PHP Classes
elePHPant
Icontem

File: sets/si_long_es.set.php

Recommend this page to a friend!
  Classes of Alex F. Bustos  >  SI Prefix Converter  >  sets/si_long_es.set.php  >  Download  
File: sets/si_long_es.set.php
Role: Auxiliary script
Content type: text/plain
Description: Copy of "long", but changing the 10e-3 prefix to mili
Class: SI Prefix Converter
Convert a number to a string appending a prefix
Author: By
Last change:
Date: 3 years ago
Size: 945 bytes
 

Contents

Class file image Download
<?php
//Long version prefixes - Taken from https://en.wikipedia.org/wiki/International_System_of_Units in 27/05/2014
//Reviewed to meet the CGPM specifications, and adapted to be used by people speaking spanish.
//(Really the only difference with the English version are the prefix used for 10^-3, i don't know
//if in other languages this modification are used too. If so, please tell me, comment in the SourceForge page)
$sci_list=array(
    -
24=>array('yocto'),
    -
21=>array('zepto'),
    -
18=>array('atto'),
    -
15=>array('femto'),
    -
12=>array('pico'),
    -
9=>array('nano'),
    -
6=>array('micro'),
    -
3=>array('mili'),
    -
2=>array('centi'),
    -
1=>array('deci'),
   
0=>array(''),
   
1=>array('deca'),
   
2=>array('hecto'),
   
3=>array('kilo'),
   
6=>array('mega'),
   
9=>array('giga'),
   
12=>array('tera'),
   
15=>array('peta'),
   
18=>array('exa'),
   
21=>array('zetta'),
   
24=>array('yotta')
);
//Common settings
$sci_min = -12;
$sci_max = 12;
$sci_base = 10;
$sci_space = 3;