English
Source / code snippets

ArcusTangens for four quadrants, speed

 

p.specht

Winkel in [wheel] = atan4(x,y)
proc atan4

    parameters x!,y!
    var w!=0

    if x!>0

        if y!>0

            if x!>y!:w!=arctan(y!/x!)

                else :w!=1.57079632679489662-arctan(x!/y!)

            endif

        elseif y!<0

            if x!<-y!:w!=4.7123889803846899+arctan(x!/-y!)

                else :w!=6.28318530717958648-arctan(-y!/x!)

            endif

            else:w!=0'y=0

        endif

    elseif x!<0

        if y!>0

            if x!>-y!:w!=1.57079632679489662+arctan(-x!/y!)

                else :w!=3.1415926535897932-arctan(y!/-x!)

            endif

        elseif y!<0

            if x!<y!:w!=3.1415926535897932+arctan(-y!/-x!)

                else :w!=4.7123889803846899-arctan(-x!/-y!)

            endif

            else:w!=3.1415926535897932

        endif

    else'if x=0

        if y!>0:w!=1.57079632679489662

        elseif y!<0:w!=4.7123889803846899

            else:w!=0

        endif

    endif

    return w!

endproc

 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/09/21  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

987 Views

Untitledvor 0 min.
Sven Bader09/15/21
Michael W.08/26/21
p.specht08/18/21
RGH08/18/21
More...

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie