Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > acb94a8b2a4b1c8c2a966ed9ee99ffe4 > files > 297

lib64wcs-devel-4.18-2.mga4.x86_64.rpm

<!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>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>WCSLIB 4.18: wcstrig.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">WCSLIB 4.18
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_af99bb3c152a306abd27951285ad1127.html">C</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">wcstrig.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;math.h&gt;</code><br/>
<code>#include &quot;wcsconfig.h&quot;</code><br/>
</div>
<p><a href="wcstrig_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:add1b8466211aa6885bed0619f32b35c7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcstrig_8h.html#add1b8466211aa6885bed0619f32b35c7">WCSTRIG_TOL</a>&#160;&#160;&#160;1e-10</td></tr>
<tr class="memdesc:add1b8466211aa6885bed0619f32b35c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Domain tolerance for asin() and acos() functions.  <a href="#add1b8466211aa6885bed0619f32b35c7">More...</a><br/></td></tr>
<tr class="separator:add1b8466211aa6885bed0619f32b35c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a42ae26d339f06986ca7f12ba02abcd32"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcstrig_8h.html#a42ae26d339f06986ca7f12ba02abcd32">cosd</a> (double angle)</td></tr>
<tr class="memdesc:a42ae26d339f06986ca7f12ba02abcd32"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cosine of an angle in degrees.  <a href="#a42ae26d339f06986ca7f12ba02abcd32">More...</a><br/></td></tr>
<tr class="separator:a42ae26d339f06986ca7f12ba02abcd32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b83ceb814c90ebfa042a26d884ac159"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcstrig_8h.html#a2b83ceb814c90ebfa042a26d884ac159">sind</a> (double angle)</td></tr>
<tr class="memdesc:a2b83ceb814c90ebfa042a26d884ac159"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sine of an angle in degrees.  <a href="#a2b83ceb814c90ebfa042a26d884ac159">More...</a><br/></td></tr>
<tr class="separator:a2b83ceb814c90ebfa042a26d884ac159"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee847369fa66666bfe1e72e7872499b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcstrig_8h.html#aee847369fa66666bfe1e72e7872499b6">sincosd</a> (double angle, double *sin, double *cos)</td></tr>
<tr class="memdesc:aee847369fa66666bfe1e72e7872499b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sine and cosine of an angle in degrees.  <a href="#aee847369fa66666bfe1e72e7872499b6">More...</a><br/></td></tr>
<tr class="separator:aee847369fa66666bfe1e72e7872499b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a666bbac788099d5bc6d88e685f2713a3"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcstrig_8h.html#a666bbac788099d5bc6d88e685f2713a3">tand</a> (double angle)</td></tr>
<tr class="memdesc:a666bbac788099d5bc6d88e685f2713a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tangent of an angle in degrees.  <a href="#a666bbac788099d5bc6d88e685f2713a3">More...</a><br/></td></tr>
<tr class="separator:a666bbac788099d5bc6d88e685f2713a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4e520246350c50275f899c9b97c68d3"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcstrig_8h.html#ab4e520246350c50275f899c9b97c68d3">acosd</a> (double x)</td></tr>
<tr class="memdesc:ab4e520246350c50275f899c9b97c68d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inverse cosine, returning angle in degrees.  <a href="#ab4e520246350c50275f899c9b97c68d3">More...</a><br/></td></tr>
<tr class="separator:ab4e520246350c50275f899c9b97c68d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a2ae59365f19adb4af90f4df3074e50"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcstrig_8h.html#a7a2ae59365f19adb4af90f4df3074e50">asind</a> (double y)</td></tr>
<tr class="memdesc:a7a2ae59365f19adb4af90f4df3074e50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inverse sine, returning angle in degrees.  <a href="#a7a2ae59365f19adb4af90f4df3074e50">More...</a><br/></td></tr>
<tr class="separator:a7a2ae59365f19adb4af90f4df3074e50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a872bdab5707df527946ecbad24ee03ab"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcstrig_8h.html#a872bdab5707df527946ecbad24ee03ab">atand</a> (double s)</td></tr>
<tr class="memdesc:a872bdab5707df527946ecbad24ee03ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inverse tangent, returning angle in degrees.  <a href="#a872bdab5707df527946ecbad24ee03ab">More...</a><br/></td></tr>
<tr class="separator:a872bdab5707df527946ecbad24ee03ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad029e98723548c7236e805c7b48c7c90"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcstrig_8h.html#ad029e98723548c7236e805c7b48c7c90">atan2d</a> (double y, double x)</td></tr>
<tr class="memdesc:ad029e98723548c7236e805c7b48c7c90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Polar angle of <img class="formulaInl" alt="$(x,y)$" src="form_0.png"/>, in degrees.  <a href="#ad029e98723548c7236e805c7b48c7c90">More...</a><br/></td></tr>
<tr class="separator:ad029e98723548c7236e805c7b48c7c90"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>When dealing with celestial coordinate systems and spherical projections (some moreso than others) it is often desirable to use an angular measure that provides an exact representation of the latitude of the north or south pole. The WCSLIB routines use the following trigonometric functions that take or return angles in degrees:</p>
<ul>
<li>
<a class="el" href="wcstrig_8h.html#a42ae26d339f06986ca7f12ba02abcd32" title="Cosine of an angle in degrees. ">cosd()</a> </li>
<li>
<a class="el" href="wcstrig_8h.html#a2b83ceb814c90ebfa042a26d884ac159" title="Sine of an angle in degrees. ">sind()</a> </li>
<li>
<a class="el" href="wcstrig_8h.html#a666bbac788099d5bc6d88e685f2713a3" title="Tangent of an angle in degrees. ">tand()</a> </li>
<li>
<a class="el" href="wcstrig_8h.html#ab4e520246350c50275f899c9b97c68d3" title="Inverse cosine, returning angle in degrees. ">acosd()</a> </li>
<li>
<a class="el" href="wcstrig_8h.html#a7a2ae59365f19adb4af90f4df3074e50" title="Inverse sine, returning angle in degrees. ">asind()</a> </li>
<li>
<a class="el" href="wcstrig_8h.html#a872bdab5707df527946ecbad24ee03ab" title="Inverse tangent, returning angle in degrees. ">atand()</a> </li>
<li>
<a class="el" href="wcstrig_8h.html#ad029e98723548c7236e805c7b48c7c90" title="Polar angle of , in degrees. ">atan2d()</a> </li>
<li>
<a class="el" href="wcstrig_8h.html#aee847369fa66666bfe1e72e7872499b6" title="Sine and cosine of an angle in degrees. ">sincosd()</a> </li>
</ul>
<p>These "trigd" routines are expected to handle angles that are a multiple of <img class="formulaInl" alt="$90^\circ$" src="form_16.png"/> returning an exact result. Some C implementations provide these as part of a system library and in such cases it may (or may not!) be preferable to use them. WCSLIB provides wrappers on the standard trig functions based on radian measure, adding tests for multiples of <img class="formulaInl" alt="$90^\circ$" src="form_16.png"/>.</p>
<p>However, <a class="el" href="wcstrig_8h.html">wcstrig.h</a> also provides the choice of using preprocessor macro implementations of the trigd functions that don't test for multiples of <img class="formulaInl" alt="$90^\circ$" src="form_16.png"/> (compile with -DWCSTRIG_MACRO). These are typically 20% faster but may lead to problems near the poles. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="add1b8466211aa6885bed0619f32b35c7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSTRIG_TOL&#160;&#160;&#160;1e-10</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Domain tolerance for the asin() and acos() functions to allow for floating point rounding errors.</p>
<p>If <img class="formulaInl" alt="$v$" src="form_71.png"/> lies in the range <img class="formulaInl" alt="$1 < |v| < 1 + WCSTRIG\_TOL$" src="form_72.png"/> then it will be treated as <img class="formulaInl" alt="$|v| == 1$" src="form_73.png"/>. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a42ae26d339f06986ca7f12ba02abcd32"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double cosd </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>cosd</b>() returns the cosine of an angle given in degrees.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">angle</td><td>[deg].</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Cosine of the angle. </dd></dl>

</div>
</div>
<a class="anchor" id="a2b83ceb814c90ebfa042a26d884ac159"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double sind </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>sind</b>() returns the sine of an angle given in degrees.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">angle</td><td>[deg].</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Sine of the angle. </dd></dl>

</div>
</div>
<a class="anchor" id="aee847369fa66666bfe1e72e7872499b6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sincosd </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>sin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>cos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>sincosd</b>() returns the sine and cosine of an angle given in degrees.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">angle</td><td>[deg].</td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">sin</td><td>Sine of the angle. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">cos</td><td>Cosine of the angle.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="a666bbac788099d5bc6d88e685f2713a3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double tand </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>tand</b>() returns the tangent of an angle given in degrees.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">angle</td><td>[deg].</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Tangent of the angle. </dd></dl>

</div>
</div>
<a class="anchor" id="ab4e520246350c50275f899c9b97c68d3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double acosd </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>x</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>acosd</b>() returns the inverse cosine in degrees.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>in the range [-1,1].</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Inverse cosine of x [deg]. </dd></dl>

</div>
</div>
<a class="anchor" id="a7a2ae59365f19adb4af90f4df3074e50"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double asind </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>y</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>asind</b>() returns the inverse sine in degrees.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>in the range [-1,1].</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Inverse sine of y [deg]. </dd></dl>

</div>
</div>
<a class="anchor" id="a872bdab5707df527946ecbad24ee03ab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double atand </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>s</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>atand</b>() returns the inverse tangent in degrees.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Inverse tangent of s [deg]. </dd></dl>

</div>
</div>
<a class="anchor" id="ad029e98723548c7236e805c7b48c7c90"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double atan2d </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>atan2d</b>() returns the polar angle, <img class="formulaInl" alt="$\beta$" src="form_68.png"/>, in degrees, of polar coordinates <img class="formulaInl" alt="$(\rho,\beta)$" src="form_69.png"/> corresponding Cartesian coordinates <img class="formulaInl" alt="$(x,y)$" src="form_0.png"/>. It is equivalent to the <img class="formulaInl" alt="$\arg(x,y)$" src="form_70.png"/> function of WCS Paper II, though with transposed arguments.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Cartesian <img class="formulaInl" alt="$y$" src="form_31.png"/>-coordinate. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Cartesian <img class="formulaInl" alt="$x$" src="form_30.png"/>-coordinate.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Polar angle of <img class="formulaInl" alt="$(x,y)$" src="form_0.png"/> [deg]. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Jul 13 2013 20:00:27 for WCSLIB 4.18 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>