Location: PHPKode > projects > PEL: PHP Exif Library > pel-0.9.1/doc/__filesource/fsource_PEL__PelEntryRational.php.html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>File Source for PelEntryRational.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
						<h1>Source for file PelEntryRational.php</h1>
<p>Documentation is available at <a href="../PEL/_PelEntryRational.php.html">PelEntryRational.php</a></p>
<div class="src-code">
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-comm">/*&nbsp;&nbsp;PEL:&nbsp;PHP&nbsp;Exif&nbsp;Library.&nbsp;&nbsp;A&nbsp;library&nbsp;with&nbsp;support&nbsp;for&nbsp;reading&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a4"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;writing&nbsp;all&nbsp;Exif&nbsp;headers&nbsp;in&nbsp;JPEG&nbsp;and&nbsp;TIFF&nbsp;images&nbsp;using&nbsp;PHP.</span></div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-comm">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a6"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;Copyright&nbsp;(C)&nbsp;2004,&nbsp;2005,&nbsp;2006&nbsp;&nbsp;Martin&nbsp;Geisler.</span></div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-comm">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a8"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software;&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and/or&nbsp;modify</span></div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;as&nbsp;published&nbsp;by</span></div></li>
<li><div class="src-line"><a name="a10"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation;&nbsp;either&nbsp;version&nbsp;2&nbsp;of&nbsp;the&nbsp;License,&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a11"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.</span></div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-comm">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a13"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,</span></div></li>
<li><div class="src-line"><a name="a14"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a16"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.</span></div></li>
<li><div class="src-line"><a name="a17"></a><span class="src-comm">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a18"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License</span></div></li>
<li><div class="src-line"><a name="a19"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;along&nbsp;with&nbsp;this&nbsp;program&nbsp;in&nbsp;the&nbsp;file&nbsp;COPYING;&nbsp;if&nbsp;not,&nbsp;write&nbsp;to&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a20"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;Free&nbsp;Software&nbsp;Foundation,&nbsp;Inc.,&nbsp;51&nbsp;Franklin&nbsp;St,&nbsp;Fifth&nbsp;Floor,</span></div></li>
<li><div class="src-line"><a name="a21"></a><span class="src-comm">&nbsp;*&nbsp;&nbsp;Boston,&nbsp;MA&nbsp;02110-1301&nbsp;USA</span></div></li>
<li><div class="src-line"><a name="a22"></a><span class="src-comm">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a23"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a24"></a><span class="src-doc">/*&nbsp;$Id:&nbsp;PelEntryRational.php&nbsp;419&nbsp;2006-02-20&nbsp;16:22:36Z&nbsp;mgeisler&nbsp;$&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a25"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a26"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a27"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a28"></a><span class="src-doc">&nbsp;*&nbsp;Classes&nbsp;used&nbsp;to&nbsp;manipulate&nbsp;rational&nbsp;numbers.</span></div></li>
<li><div class="src-line"><a name="a29"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a30"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;Martin&nbsp;Geisler&nbsp;&lt;hide@address.com&gt;</span></div></li>
<li><div class="src-line"><a name="a31"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@version</span><span class="src-doc">&nbsp;$Revision:&nbsp;419&nbsp;$</span></div></li>
<li><div class="src-line"><a name="a32"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-tag">@date</span><span class="src-doc">&nbsp;$Date:&nbsp;2006-02-20&nbsp;17:22:36&nbsp;+0100&nbsp;(Mon,&nbsp;20&nbsp;Feb&nbsp;2006)&nbsp;$</span></div></li>
<li><div class="src-line"><a name="a33"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@license</span><span class="src-doc">&nbsp;http://www.gnu.org/licenses/gpl.html&nbsp;GNU&nbsp;General&nbsp;Public</span></div></li>
<li><div class="src-line"><a name="a34"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;License&nbsp;(GPL)</span></div></li>
<li><div class="src-line"><a name="a35"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;PEL</span></div></li>
<li><div class="src-line"><a name="a36"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a37"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a38"></a><span class="src-doc">/**#@+&nbsp;Required&nbsp;class&nbsp;definitions.&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a39"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-str">'PelEntryLong.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a40"></a><span class="src-doc-close-template">/**#@-*/</span></div></li>
<li><div class="src-line"><a name="a41"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a42"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a43"></a><span class="src-doc-template">&nbsp;*&nbsp;Class&nbsp;for&nbsp;holding&nbsp;unsigned&nbsp;rational&nbsp;numbers.</span></div></li>
<li><div class="src-line"><a name="a44"></a><span class="src-doc-template">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a45"></a><span class="src-doc-template">&nbsp;*&nbsp;This&nbsp;class&nbsp;can&nbsp;hold&nbsp;rational&nbsp;numbers,&nbsp;consisting&nbsp;of&nbsp;a&nbsp;numerator&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a46"></a><span class="src-doc-template">&nbsp;*&nbsp;denominator&nbsp;both&nbsp;of&nbsp;which&nbsp;are&nbsp;of&nbsp;type&nbsp;unsigned&nbsp;long.&nbsp;&nbsp;Each&nbsp;rational</span></div></li>
<li><div class="src-line"><a name="a47"></a><span class="src-doc-template">&nbsp;*&nbsp;is&nbsp;represented&nbsp;by&nbsp;an&nbsp;array&nbsp;with&nbsp;just&nbsp;two&nbsp;entries:&nbsp;the&nbsp;numerator&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a48"></a><span class="src-doc-template">&nbsp;*&nbsp;the&nbsp;denominator,&nbsp;in&nbsp;that&nbsp;order.</span></div></li>
<li><div class="src-line"><a name="a49"></a><span class="src-doc-template">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a50"></a><span class="src-doc-template">&nbsp;*&nbsp;The&nbsp;class&nbsp;can&nbsp;hold&nbsp;either&nbsp;just&nbsp;a&nbsp;single&nbsp;rational&nbsp;or&nbsp;an&nbsp;array&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a51"></a><span class="src-doc-template">&nbsp;*&nbsp;rationals.&nbsp;&nbsp;The&nbsp;class&nbsp;will&nbsp;be&nbsp;used&nbsp;to&nbsp;manipulate&nbsp;any&nbsp;of&nbsp;the&nbsp;Exif</span></div></li>
<li><div class="src-line"><a name="a52"></a><span class="src-doc-template">&nbsp;*&nbsp;tags&nbsp;which&nbsp;can&nbsp;have&nbsp;format&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;PelFormat::RATIONAL}</span><span class="src-doc-template">&nbsp;like&nbsp;in&nbsp;this</span></div></li>
<li><div class="src-line"><a name="a53"></a><span class="src-doc-template">&nbsp;*&nbsp;example:</span></div></li>
<li><div class="src-line"><a name="a54"></a><span class="src-doc-template">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a55"></a><span class="src-doc-template">&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a56"></a><span class="src-doc-template">&nbsp;*&nbsp;$resolution&nbsp;=&nbsp;$ifd-&gt;getEntry(PelTag::X_RESOLUTION);</span></div></li>
<li><div class="src-line"><a name="a57"></a><span class="src-doc-template">&nbsp;*&nbsp;$resolution-&gt;setValue(array(1,&nbsp;300));</span></div></li>
<li><div class="src-line"><a name="a58"></a><span class="src-doc-template">&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a59"></a><span class="src-doc-template">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a60"></a><span class="src-doc-template">&nbsp;*&nbsp;Here&nbsp;the&nbsp;x-resolution&nbsp;is&nbsp;adjusted&nbsp;to&nbsp;1/300,&nbsp;which&nbsp;will&nbsp;be&nbsp;300&nbsp;DPI,</span></div></li>
<li><div class="src-line"><a name="a61"></a><span class="src-doc-template">&nbsp;*&nbsp;unless&nbsp;the&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;PelTag::RESOLUTION_UNIT&nbsp;resolution&nbsp;unit}</span><span class="src-doc-template">&nbsp;is&nbsp;set</span></div></li>
<li><div class="src-line"><a name="a62"></a><span class="src-doc-template">&nbsp;*&nbsp;to&nbsp;something&nbsp;different&nbsp;than&nbsp;2&nbsp;which&nbsp;means&nbsp;inches.</span></div></li>
<li><div class="src-line"><a name="a63"></a><span class="src-doc-template">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a64"></a><span class="src-doc-template">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc-template">&nbsp;Martin&nbsp;Geisler&nbsp;&lt;hide@address.com&gt;</span></div></li>
<li><div class="src-line"><a name="a65"></a><span class="src-doc-template">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc-template">&nbsp;PEL</span></div></li>
<li><div class="src-line"><a name="a67"></a><span class="src-doc-template">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a68"></a><span class="src-key">class&nbsp;</span><a href="../PEL/PelEntryRational.html">PelEntryRational</a>&nbsp;<span class="src-key">extends&nbsp;</span><a href="../PEL/PelEntryLong.html">PelEntryLong</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a69"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a70"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a71"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Make&nbsp;a&nbsp;new&nbsp;entry&nbsp;that&nbsp;can&nbsp;hold&nbsp;an&nbsp;unsigned&nbsp;rational.</span></div></li>
<li><div class="src-line"><a name="a72"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a73"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">PelTag&nbsp;</span><span class="src-doc">the&nbsp;tag&nbsp;which&nbsp;this&nbsp;entry&nbsp;represents.&nbsp;&nbsp;This&nbsp;should</span></div></li>
<li><div class="src-line"><a name="a74"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;be&nbsp;one&nbsp;of&nbsp;the&nbsp;constants&nbsp;defined&nbsp;in&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;PelTag}</span><span class="src-doc">,&nbsp;e.g.,&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;}</span></div></li>
<li><div class="src-line"><a name="a75"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;PelTag::X_RESOLUTION},&nbsp;or&nbsp;any&nbsp;other&nbsp;tag&nbsp;which&nbsp;can&nbsp;have&nbsp;format</span></div></li>
<li><div class="src-line"><a name="a76"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;PelFormat::RATIONAL}</span><span class="src-doc">.</span></div></li>
<li><div class="src-line"><a name="a77"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a78"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$value...&nbsp;</span><span class="src-doc">the&nbsp;rational(s)&nbsp;that&nbsp;this&nbsp;entry&nbsp;will</span></div></li>
<li><div class="src-line"><a name="a79"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;represent.&nbsp;&nbsp;The&nbsp;arguments&nbsp;passed&nbsp;must&nbsp;obey&nbsp;the&nbsp;same&nbsp;rules&nbsp;as&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a80"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;argument&nbsp;to&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;setValue}</span><span class="src-doc">,&nbsp;namely&nbsp;that&nbsp;each&nbsp;argument&nbsp;should&nbsp;be</span></div></li>
<li><div class="src-line"><a name="a81"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;an&nbsp;array&nbsp;with&nbsp;two&nbsp;entries,&nbsp;both&nbsp;of&nbsp;which&nbsp;must&nbsp;be&nbsp;within&nbsp;range&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a82"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;an&nbsp;unsigned&nbsp;long&nbsp;(32&nbsp;bit),&nbsp;that&nbsp;is&nbsp;between&nbsp;0&nbsp;and&nbsp;4294967295</span></div></li>
<li><div class="src-line"><a name="a83"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;(inclusive).&nbsp;&nbsp;If&nbsp;not,&nbsp;then&nbsp;a&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;PelOverflowException}</span><span class="src-doc">&nbsp;will&nbsp;be</span></div></li>
<li><div class="src-line"><a name="a84"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;thrown.</span></div></li>
<li><div class="src-line"><a name="a85"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a86"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PEL/PelEntryRational.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-var">$tag&nbsp;</span><span class="src-comm">/*&nbsp;$value...&nbsp;*/</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a87"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntry.html#var$tag">tag</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="src-var">$tag</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a88"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntry.html#var$format">format</a>&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="src-id"><a href="../PEL/PelFormat.html">PelFormat</a></span><span class="src-sym">::</span><span class="src-id">RATIONAL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a89"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$dimension">dimension</a>&nbsp;=&nbsp;<span class="src-num">2</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a90"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$min">min</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a91"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$max">max</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="src-num">4294967295</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a92"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a93"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$value&nbsp;</span>=&nbsp;<a href="http://www.php.net/func_get_args">func_get_args</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a94"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/array_shift">array_shift</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a95"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#methodsetValueArray">setValueArray</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a96"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a97"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a98"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a99"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a100"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Format&nbsp;a&nbsp;rational&nbsp;number.</span></div></li>
<li><div class="src-line"><a name="a101"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a102"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;rational&nbsp;will&nbsp;be&nbsp;returned&nbsp;as&nbsp;a&nbsp;string&nbsp;with&nbsp;a&nbsp;slash&nbsp;'/'</span></div></li>
<li><div class="src-line"><a name="a103"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;between&nbsp;the&nbsp;numerator&nbsp;and&nbsp;denominator.</span></div></li>
<li><div class="src-line"><a name="a104"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a105"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc">the&nbsp;rational&nbsp;which&nbsp;will&nbsp;be&nbsp;formatted.</span></div></li>
<li><div class="src-line"><a name="a106"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a107"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span><span class="src-doc">not&nbsp;used.</span></div></li>
<li><div class="src-line"><a name="a108"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a109"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc">the&nbsp;rational&nbsp;formatted&nbsp;as&nbsp;a&nbsp;string&nbsp;suitable&nbsp;for</span></div></li>
<li><div class="src-line"><a name="a110"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;display.</span></div></li>
<li><div class="src-line"><a name="a111"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a112"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PEL/PelEntryRational.html#methodformatNumber">formatNumber</a><span class="src-sym">(</span><span class="src-var">$number</span><span class="src-sym">,&nbsp;</span><span class="src-var">$brief&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a113"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$number</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>.&nbsp;<span class="src-str">'/'&nbsp;</span>.&nbsp;<span class="src-var">$number</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a114"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a115"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a116"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a117"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a118"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;value&nbsp;of&nbsp;an&nbsp;entry&nbsp;as&nbsp;text.</span></div></li>
<li><div class="src-line"><a name="a119"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a120"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;value&nbsp;will&nbsp;be&nbsp;returned&nbsp;in&nbsp;a&nbsp;format&nbsp;suitable&nbsp;for&nbsp;presentation,</span></div></li>
<li><div class="src-line"><a name="a121"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;e.g.,&nbsp;rationals&nbsp;will&nbsp;be&nbsp;returned&nbsp;as&nbsp;'x/y',&nbsp;ASCII&nbsp;strings&nbsp;will&nbsp;be</span></div></li>
<li><div class="src-line"><a name="a122"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;returned&nbsp;as&nbsp;themselves&nbsp;etc.</span></div></li>
<li><div class="src-line"><a name="a123"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a124"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span><span class="src-doc">some&nbsp;values&nbsp;can&nbsp;be&nbsp;returned&nbsp;in&nbsp;a&nbsp;long&nbsp;or&nbsp;more</span></div></li>
<li><div class="src-line"><a name="a125"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;brief&nbsp;form,&nbsp;and&nbsp;this&nbsp;parameter&nbsp;controls&nbsp;that.</span></div></li>
<li><div class="src-line"><a name="a126"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a127"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc">the&nbsp;value&nbsp;as&nbsp;text.</span></div></li>
<li><div class="src-line"><a name="a128"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a129"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PEL/PelEntryRational.html#methodgetText">getText</a><span class="src-sym">(</span><span class="src-var">$brief&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a130"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$value">value</a><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a131"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$v&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$value">value</a><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a132"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a133"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">switch&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntry.html#var$tag">tag</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a134"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../PEL/PelTag.html">PelTag</a></span><span class="src-sym">::</span><span class="src-id">FNUMBER</span>:</div></li>
<li><div class="src-line"><a name="a135"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//CC&nbsp;(e-&gt;components,&nbsp;1,&nbsp;v);</span></div></li>
<li><div class="src-line"><a name="a136"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id"><a href="../PEL/Pel.html">Pel</a></span><span class="src-sym">::</span><a href="../PEL/Pel.html#methodfmt">fmt</a><span class="src-sym">(</span><span class="src-str">'f/%.01f'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span>/<span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a137"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a138"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../PEL/PelTag.html">PelTag</a></span><span class="src-sym">::</span><span class="src-id">APERTURE_VALUE</span>:</div></li>
<li><div class="src-line"><a name="a139"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//CC&nbsp;(e-&gt;components,&nbsp;1,&nbsp;v);</span></div></li>
<li><div class="src-line"><a name="a140"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//if&nbsp;(!v_rat.denominator)&nbsp;return&nbsp;(NULL);</span></div></li>
<li><div class="src-line"><a name="a141"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id"><a href="../PEL/Pel.html">Pel</a></span><span class="src-sym">::</span><a href="../PEL/Pel.html#methodfmt">fmt</a><span class="src-sym">(</span><span class="src-str">'f/%.01f'</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/pow">pow</a><span class="src-sym">(</span><span class="src-num">2</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span>/<span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span>/<span class="src-num">2</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a142"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a143"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../PEL/PelTag.html">PelTag</a></span><span class="src-sym">::</span><span class="src-id">FOCAL_LENGTH</span>:</div></li>
<li><div class="src-line"><a name="a144"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//CC&nbsp;(e-&gt;components,&nbsp;1,&nbsp;v);</span></div></li>
<li><div class="src-line"><a name="a145"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//if&nbsp;(!v_rat.denominator)&nbsp;return&nbsp;(NULL);</span></div></li>
<li><div class="src-line"><a name="a146"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id"><a href="../PEL/Pel.html">Pel</a></span><span class="src-sym">::</span><a href="../PEL/Pel.html#methodfmt">fmt</a><span class="src-sym">(</span><span class="src-str">'%.1f&nbsp;mm'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span>/<span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a147"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a148"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../PEL/PelTag.html">PelTag</a></span><span class="src-sym">::</span><span class="src-id">SUBJECT_DISTANCE</span>:</div></li>
<li><div class="src-line"><a name="a149"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//CC&nbsp;(e-&gt;components,&nbsp;1,&nbsp;v);</span></div></li>
<li><div class="src-line"><a name="a150"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//if&nbsp;(!v_rat.denominator)&nbsp;return&nbsp;(NULL);</span></div></li>
<li><div class="src-line"><a name="a151"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id"><a href="../PEL/Pel.html">Pel</a></span><span class="src-sym">::</span><a href="../PEL/Pel.html#methodfmt">fmt</a><span class="src-sym">(</span><span class="src-str">'%.1f&nbsp;m'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span>/<span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a152"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a153"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../PEL/PelTag.html">PelTag</a></span><span class="src-sym">::</span><span class="src-id">EXPOSURE_TIME</span>:</div></li>
<li><div class="src-line"><a name="a154"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//CC&nbsp;(e-&gt;components,&nbsp;1,&nbsp;v);</span></div></li>
<li><div class="src-line"><a name="a155"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//if&nbsp;(!v_rat.denominator)&nbsp;return&nbsp;(NULL);</span></div></li>
<li><div class="src-line"><a name="a156"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span>/<span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]&nbsp;</span>&lt;&nbsp;<span class="src-num">1</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a157"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id"><a href="../PEL/Pel.html">Pel</a></span><span class="src-sym">::</span><a href="../PEL/Pel.html#methodfmt">fmt</a><span class="src-sym">(</span><span class="src-str">'1/%d&nbsp;sec.'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span>/<span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a158"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a159"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id"><a href="../PEL/Pel.html">Pel</a></span><span class="src-sym">::</span><a href="../PEL/Pel.html#methodfmt">fmt</a><span class="src-sym">(</span><span class="src-str">'%d&nbsp;sec.'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span>/<span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a160"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a161"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../PEL/PelTag.html">PelTag</a></span><span class="src-sym">::</span><span class="src-id">GPS_LATITUDE</span>:</div></li>
<li><div class="src-line"><a name="a162"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../PEL/PelTag.html">PelTag</a></span><span class="src-sym">::</span><span class="src-id">GPS_LONGITUDE</span>:</div></li>
<li><div class="src-line"><a name="a163"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$degrees&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$value">value</a><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span>/<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$value">value</a><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a164"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$minutes&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$value">value</a><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span>/<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$value">value</a><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a165"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$seconds&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$value">value</a><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span>/<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$value">value</a><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a166"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a167"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">'%s°&nbsp;%s\'&nbsp;%s&quot;&nbsp;(%.2f°)'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a168"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$degrees</span><span class="src-sym">,&nbsp;</span><span class="src-var">$minutes</span><span class="src-sym">,&nbsp;</span><span class="src-var">$seconds</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a169"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$degrees&nbsp;</span>+&nbsp;<span class="src-var">$minutes</span>/<span class="src-num">60&nbsp;</span>+&nbsp;<span class="src-var">$seconds</span>/<span class="src-num">3600</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a170"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a171"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">default</span>:</div></li>
<li><div class="src-line"><a name="a172"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">parent</span><span class="src-sym">::</span><span class="src-id">getText</span><span class="src-sym">(</span><span class="src-var">$brief</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a173"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a174"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a175"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a176"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a177"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a178"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a179"></a><span class="src-doc">&nbsp;*&nbsp;Class&nbsp;for&nbsp;holding&nbsp;signed&nbsp;rational&nbsp;numbers.</span></div></li>
<li><div class="src-line"><a name="a180"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a181"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;class&nbsp;can&nbsp;hold&nbsp;rational&nbsp;numbers,&nbsp;consisting&nbsp;of&nbsp;a&nbsp;numerator&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a182"></a><span class="src-doc">&nbsp;*&nbsp;denominator&nbsp;both&nbsp;of&nbsp;which&nbsp;are&nbsp;of&nbsp;type&nbsp;unsigned&nbsp;long.&nbsp;&nbsp;Each&nbsp;rational</span></div></li>
<li><div class="src-line"><a name="a183"></a><span class="src-doc">&nbsp;*&nbsp;is&nbsp;represented&nbsp;by&nbsp;an&nbsp;array&nbsp;with&nbsp;just&nbsp;two&nbsp;entries:&nbsp;the&nbsp;numerator&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a184"></a><span class="src-doc">&nbsp;*&nbsp;the&nbsp;denominator,&nbsp;in&nbsp;that&nbsp;order.</span></div></li>
<li><div class="src-line"><a name="a185"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a186"></a><span class="src-doc">&nbsp;*&nbsp;The&nbsp;class&nbsp;can&nbsp;hold&nbsp;either&nbsp;just&nbsp;a&nbsp;single&nbsp;rational&nbsp;or&nbsp;an&nbsp;array&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a187"></a><span class="src-doc">&nbsp;*&nbsp;rationals.&nbsp;&nbsp;The&nbsp;class&nbsp;will&nbsp;be&nbsp;used&nbsp;to&nbsp;manipulate&nbsp;any&nbsp;of&nbsp;the&nbsp;Exif</span></div></li>
<li><div class="src-line"><a name="a188"></a><span class="src-doc">&nbsp;*&nbsp;tags&nbsp;which&nbsp;can&nbsp;have&nbsp;format&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;PelFormat::SRATIONAL}</span><span class="src-doc">.</span></div></li>
<li><div class="src-line"><a name="a189"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a190"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;Martin&nbsp;Geisler&nbsp;&lt;hide@address.com&gt;</span></div></li>
<li><div class="src-line"><a name="a191"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;PEL</span></div></li>
<li><div class="src-line"><a name="a192"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a193"></a><span class="src-key">class&nbsp;</span><a href="../PEL/PelEntrySRational.html">PelEntrySRational</a>&nbsp;<span class="src-key">extends&nbsp;</span><a href="../PEL/PelEntrySLong.html">PelEntrySLong</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a194"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a195"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a196"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Make&nbsp;a&nbsp;new&nbsp;entry&nbsp;that&nbsp;can&nbsp;hold&nbsp;a&nbsp;signed&nbsp;rational.</span></div></li>
<li><div class="src-line"><a name="a197"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a198"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">PelTag&nbsp;</span><span class="src-doc">the&nbsp;tag&nbsp;which&nbsp;this&nbsp;entry&nbsp;represents.&nbsp;&nbsp;This&nbsp;should</span></div></li>
<li><div class="src-line"><a name="a199"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;be&nbsp;one&nbsp;of&nbsp;the&nbsp;constants&nbsp;defined&nbsp;in&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;PelTag}</span><span class="src-doc">,&nbsp;e.g.,&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;}</span></div></li>
<li><div class="src-line"><a name="a200"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;PelTag::SHUTTER_SPEED_VALUE},&nbsp;or&nbsp;any&nbsp;other&nbsp;tag&nbsp;which&nbsp;can&nbsp;have</span></div></li>
<li><div class="src-line"><a name="a201"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;format&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;PelFormat::SRATIONAL}</span><span class="src-doc">.</span></div></li>
<li><div class="src-line"><a name="a202"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a203"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$value...&nbsp;</span><span class="src-doc">the&nbsp;rational(s)&nbsp;that&nbsp;this&nbsp;entry&nbsp;will</span></div></li>
<li><div class="src-line"><a name="a204"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;represent.&nbsp;&nbsp;The&nbsp;arguments&nbsp;passed&nbsp;must&nbsp;obey&nbsp;the&nbsp;same&nbsp;rules&nbsp;as&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a205"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;argument&nbsp;to&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;setValue}</span><span class="src-doc">,&nbsp;namely&nbsp;that&nbsp;each&nbsp;argument&nbsp;should&nbsp;be</span></div></li>
<li><div class="src-line"><a name="a206"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;an&nbsp;array&nbsp;with&nbsp;two&nbsp;entries,&nbsp;both&nbsp;of&nbsp;which&nbsp;must&nbsp;be&nbsp;within&nbsp;range&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a207"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;a&nbsp;signed&nbsp;long&nbsp;(32&nbsp;bit),&nbsp;that&nbsp;is&nbsp;between&nbsp;-2147483648&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a208"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;2147483647&nbsp;(inclusive).&nbsp;&nbsp;If&nbsp;not,&nbsp;then&nbsp;a&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;}</span></div></li>
<li><div class="src-line"><a name="a209"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;PelOverflowException}&nbsp;will&nbsp;be&nbsp;thrown.</span></div></li>
<li><div class="src-line"><a name="a210"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a211"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PEL/PelEntrySRational.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-var">$tag&nbsp;</span><span class="src-comm">/*&nbsp;$value...&nbsp;*/</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a212"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntry.html#var$tag">tag</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="src-var">$tag</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a213"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntry.html#var$format">format</a>&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="src-id"><a href="../PEL/PelFormat.html">PelFormat</a></span><span class="src-sym">::</span><span class="src-id">SRATIONAL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a214"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$dimension">dimension</a>&nbsp;=&nbsp;<span class="src-num">2</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a215"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$min">min</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;-<span class="src-num">2147483648</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a216"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$max">max</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="src-num">2147483647</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a217"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a218"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$value&nbsp;</span>=&nbsp;<a href="http://www.php.net/func_get_args">func_get_args</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a219"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/array_shift">array_shift</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a220"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#methodsetValueArray">setValueArray</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a221"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a222"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a223"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a224"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a225"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Format&nbsp;a&nbsp;rational&nbsp;number.</span></div></li>
<li><div class="src-line"><a name="a226"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a227"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;rational&nbsp;will&nbsp;be&nbsp;returned&nbsp;as&nbsp;a&nbsp;string&nbsp;with&nbsp;a&nbsp;slash&nbsp;'/'</span></div></li>
<li><div class="src-line"><a name="a228"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;between&nbsp;the&nbsp;numerator&nbsp;and&nbsp;denominator.&nbsp;&nbsp;Care&nbsp;is&nbsp;taken&nbsp;to&nbsp;display</span></div></li>
<li><div class="src-line"><a name="a229"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;'-1/2'&nbsp;instead&nbsp;of&nbsp;the&nbsp;ugly&nbsp;but&nbsp;mathematically&nbsp;equivalent&nbsp;'1/-2'.</span></div></li>
<li><div class="src-line"><a name="a230"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a231"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc">the&nbsp;rational&nbsp;which&nbsp;will&nbsp;be&nbsp;formatted.</span></div></li>
<li><div class="src-line"><a name="a232"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a233"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span><span class="src-doc">not&nbsp;used.</span></div></li>
<li><div class="src-line"><a name="a234"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a235"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc">the&nbsp;rational&nbsp;formatted&nbsp;as&nbsp;a&nbsp;string&nbsp;suitable&nbsp;for</span></div></li>
<li><div class="src-line"><a name="a236"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;display.</span></div></li>
<li><div class="src-line"><a name="a237"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a238"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PEL/PelEntrySRational.html#methodformatNumber">formatNumber</a><span class="src-sym">(</span><span class="src-var">$number</span><span class="src-sym">,&nbsp;</span><span class="src-var">$brief&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a239"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$number</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]&nbsp;</span>&lt;&nbsp;<span class="src-num">0</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a240"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">/*&nbsp;Turn&nbsp;output&nbsp;like&nbsp;1/-2&nbsp;into&nbsp;-1/2.&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a241"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-sym">(</span>-<span class="src-var">$number</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">'/'&nbsp;</span>.&nbsp;<span class="src-sym">(</span>-<span class="src-var">$number</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a242"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a243"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$number</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>.&nbsp;<span class="src-str">'/'&nbsp;</span>.&nbsp;<span class="src-var">$number</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a244"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a245"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a246"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a247"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a248"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;value&nbsp;of&nbsp;an&nbsp;entry&nbsp;as&nbsp;text.</span></div></li>
<li><div class="src-line"><a name="a249"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a250"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;value&nbsp;will&nbsp;be&nbsp;returned&nbsp;in&nbsp;a&nbsp;format&nbsp;suitable&nbsp;for&nbsp;presentation,</span></div></li>
<li><div class="src-line"><a name="a251"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;e.g.,&nbsp;rationals&nbsp;will&nbsp;be&nbsp;returned&nbsp;as&nbsp;'x/y',&nbsp;ASCII&nbsp;strings&nbsp;will&nbsp;be</span></div></li>
<li><div class="src-line"><a name="a252"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;returned&nbsp;as&nbsp;themselves&nbsp;etc.</span></div></li>
<li><div class="src-line"><a name="a253"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a254"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span><span class="src-doc">some&nbsp;values&nbsp;can&nbsp;be&nbsp;returned&nbsp;in&nbsp;a&nbsp;long&nbsp;or&nbsp;more</span></div></li>
<li><div class="src-line"><a name="a255"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;brief&nbsp;form,&nbsp;and&nbsp;this&nbsp;parameter&nbsp;controls&nbsp;that.</span></div></li>
<li><div class="src-line"><a name="a256"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a257"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc">the&nbsp;value&nbsp;as&nbsp;text.</span></div></li>
<li><div class="src-line"><a name="a258"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a259"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PEL/PelEntrySRational.html#methodgetText">getText</a><span class="src-sym">(</span><span class="src-var">$brief&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a260"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$value">value</a><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a261"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$v&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntryNumber.html#var$value">value</a><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a262"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a263"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">switch&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PEL/PelEntry.html#var$tag">tag</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a264"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../PEL/PelTag.html">PelTag</a></span><span class="src-sym">::</span><span class="src-id">SHUTTER_SPEED_VALUE</span>:</div></li>
<li><div class="src-line"><a name="a265"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//CC&nbsp;(e-&gt;components,&nbsp;1,&nbsp;v);</span></div></li>
<li><div class="src-line"><a name="a266"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//if&nbsp;(!v_srat.denominator)&nbsp;return&nbsp;(NULL);</span></div></li>
<li><div class="src-line"><a name="a267"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id"><a href="../PEL/Pel.html">Pel</a></span><span class="src-sym">::</span><a href="../PEL/Pel.html#methodfmt">fmt</a><span class="src-sym">(</span><span class="src-str">'%.0f/%.0f&nbsp;sec.&nbsp;(APEX:&nbsp;%d)'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a268"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/pow">pow</a><span class="src-sym">(</span><a href="http://www.php.net/sqrt">sqrt</a><span class="src-sym">(</span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span>/<span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a269"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a270"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../PEL/PelTag.html">PelTag</a></span><span class="src-sym">::</span><span class="src-id">BRIGHTNESS_VALUE</span>:</div></li>
<li><div class="src-line"><a name="a271"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//CC&nbsp;(e-&gt;components,&nbsp;1,&nbsp;v);</span></div></li>
<li><div class="src-line"><a name="a272"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//</span></div></li>
<li><div class="src-line"><a name="a273"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;TODO:&nbsp;figure&nbsp;out&nbsp;the&nbsp;APEX&nbsp;thing,&nbsp;or&nbsp;remove&nbsp;this&nbsp;so&nbsp;that&nbsp;it&nbsp;is</span></div></li>
<li><div class="src-line"><a name="a274"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;handled&nbsp;by&nbsp;the&nbsp;default&nbsp;clause&nbsp;at&nbsp;the&nbsp;bottom.</span></div></li>
<li><div class="src-line"><a name="a275"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">'%d/%d'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a276"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//FIXME:&nbsp;How&nbsp;do&nbsp;I&nbsp;calculate&nbsp;the&nbsp;APEX&nbsp;value?</span></div></li>
<li><div class="src-line"><a name="a277"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a278"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../PEL/PelTag.html">PelTag</a></span><span class="src-sym">::</span><span class="src-id">EXPOSURE_BIAS_VALUE</span>:</div></li>
<li><div class="src-line"><a name="a279"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//CC&nbsp;(e-&gt;components,&nbsp;1,&nbsp;v);</span></div></li>
<li><div class="src-line"><a name="a280"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//if&nbsp;(!v_srat.denominator)&nbsp;return&nbsp;(NULL);</span></div></li>
<li><div class="src-line"><a name="a281"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">'%s%.01f'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span>*<span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]&nbsp;</span>&gt;&nbsp;<span class="src-num">0&nbsp;</span>?&nbsp;<span class="src-str">'+'&nbsp;</span>:&nbsp;<span class="src-str">''</span><span class="src-sym">,&nbsp;</span><span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span>/<span class="src-var">$v</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a282"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a283"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">default</span>:</div></li>
<li><div class="src-line"><a name="a284"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">parent</span><span class="src-sym">::</span><span class="src-id">getText</span><span class="src-sym">(</span><span class="src-var">$brief</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a285"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a286"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a287"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a288"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a289"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a290"></a><span class="src-php">?&gt;</span></div></li>
</ol></div>
</div>
	<p class="notes" id="credit">
		Documentation generated on Tue, 19 Dec 2006 01:08:21 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0</a>
                <a target="_top" href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=108380&amp;type=1" width="88" height="31" border="0" align="right" alt="SourceForge.net Logo" /></a>
	</p>
	</body>
</html>
Return current item: PEL: PHP Exif Library