Difference between revisions of "Template:Atan2"

From Discovery Wiki
Jump to navigationJump to search
m
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>== Usage ==
 
<noinclude>== Usage ==
  
:<nowiki>{{atan2|y{{=}}a real number|x{{=}}a real number|cut{{=}}an integer}}</nowiki>
+
:<nowiki>{{atan2|y=a real number|x=a real number|cut=an integer}}</nowiki>
  
 
or
 
or
  
:<nowiki>{{atan2|a real number|a real number|an integer}}</nowiki></noinclude>
+
:<nowiki>{{atan2|a real number|a real number|an integer}}</nowiki>
 +
 
 +
Taken from [http://oeis.org/wiki/Template:Atan2 http://oeis.org/wiki/Template:Atan2].</noinclude>
 
<noinclude><!-- works fine --><!-- Returns angle in (-pi, +pi] (default) or [0, 2*pi) --></noinclude><includeonly>{{ifnum| {{{y|{{{1|NAN}}}}}}{{{x|{{{2|NAN}}}}}}<!-- {{{cut|{{{3|1}}}}}} odd (for 1*pi, default) or even (for 2*pi) -->
 
<noinclude><!-- works fine --><!-- Returns angle in (-pi, +pi] (default) or [0, 2*pi) --></noinclude><includeonly>{{ifnum| {{{y|{{{1|NAN}}}}}}{{{x|{{{2|NAN}}}}}}<!-- {{{cut|{{{3|1}}}}}} odd (for 1*pi, default) or even (for 2*pi) -->
 
| {{#switch: {{#expr: 3*{{sgn| {{{y|{{{1}}}}}} }} + {{sgn| {{{x|{{{2}}}}}} }} }}  
 
| {{#switch: {{#expr: 3*{{sgn| {{{y|{{{1}}}}}} }} + {{sgn| {{{x|{{{2}}}}}} }} }}  

Latest revision as of 12:48, 8 April 2013

Usage

{{atan2|y=a real number|x=a real number|cut=an integer}}

or

{{atan2|a real number|a real number|an integer}}

Taken from http://oeis.org/wiki/Template:Atan2.