English
Source / code snippets

detect Relationship numbers Zweier

 

Frank
Abbing

CompileMarkSeparation
http://frabbing.de

Proc Verhaeltnis$

    Parameters px&,py&
    Declare r&,hold&,oldpx&,oldpy&
    Case ((px&<=0) or (py&<=0)):Return
    oldpx&=px&
    oldpy&=py&

    Repeat

        If px&<py&

            hold&=px&
            px&=py&
            py&=hold&

        Endif

        r&=px&-py&
        px&=py&
        py&=r&

    Until r&=0

    Return Str$(Int(oldpx&/px&))+:+Str$(Int(oldpy&/px&))

EndProc

Declare text$
Cls
text$=Verhaeltnis$(1024,768)
Print text$
WaitInput
End
 
12/31/08  
 




Michael
Wodrich
Yes thanks, so can so some interesantes experienced...
CompileMarkSeparation
http://frabbing.de
(vermurkst von: wod)

Proc Seitenverhaeltnis_eines_Bildes_ermitteln$

    Parameters X&, Y&
    Declare Ori_X&, Ori_Y&, Rest&, tausch&
    Case (X& <= 0) or (Y& <= 0) : Return nicht ermittelbar
    Ori_X& = X&
    Ori_Y& = Y&

    Repeat

        If X& < Y& : tausch& = X& : X& = Y& : Y& = tausch& : EndIf

            Rest& = X& - Y&
            X& = Y&
            Y& = Rest&

        Until Rest& = 0

        Return Str$(Int(Ori_X& / X&)) + : + Str$(Int(Ori_Y& / X&))

    EndProc

    Proc ermittle_Seite_X_im_Seitenverhaeltnis

        Parameters verh_X&, verh_Y&, Seite_Y&
        Return Int(Seite_Y& / verh_Y& * verh_X&)

    EndProc

    Proc ermittle_Seite_Y_im_Seitenverhaeltnis

        Parameters verh_X&, verh_Y&, Seite_X&
        Return Int(Seite_X& / verh_X& * verh_Y&)

    EndProc

    Proc zeige_Verh

        Parameters Bild_X&, Bild_Y&
        Print Seitenverhältnis eines,
        Format$(#,0,Bild_X&),x,Format$(#,0,Bild_Y&),großen Bildes:,
        Seitenverhaeltnis_eines_Bildes_ermitteln$(Bild_X&,Bild_Y&);

    EndProc

    Proc zeige_X

        Parameters verh_X&,verh_Y&,Bild_Y&
        Print Seitenverhältnis=,
        Format$(#,0,verh_X&);:;Format$(#,0,verh_Y&);
        , Bild X=,Format$(#,0,ermittle_Seite_X_im_Seitenverhaeltnis(verh_X&,verh_Y&,Bild_Y&));
        , Bild Y=,Format$(#,0,Bild_Y&);

    EndProc

    Proc zeige_Y

        Parameters verh_X&,verh_Y&,Bild_X&
        Print Seitenverhältnis=,
        Format$(#,0,verh_X&);:;Format$(#,0,verh_Y&);
        , Bild X=,Format$(#,0,Bild_X&);
        , Bild Y=,Format$(#,0,ermittle_Seite_Y_im_Seitenverhaeltnis(verh_X&,verh_Y&,Bild_X&));

    EndProc

    Cls
    Print Schon interessant, was ne superalte NVidia so drauf hat...
    zeige_Verh(1600,1200)
    zeige_Verh(1600,1024)
    zeige_Verh(1600, 900)
    zeige_Verh(1360, 768)
    zeige_Verh(1280, 960)
    zeige_Verh(1280, 768)
    zeige_Verh(1280, 720)
    zeige_Verh(1152, 864)
    zeige_Verh(1024, 768)
    zeige_Verh( 848, 480)
    zeige_Verh( 800, 600)
    zeige_Verh( 720, 576)
    zeige_Verh( 720, 480)
    zeige_Verh( 640, 480)
    zeige_X(4,3,768)
    zeige_Y(16,9,1280)
    End

Best wishes
Michael Wodrich
 
Programmieren, das spannendste Detektivspiel der Welt.
01/02/09  
 



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

5.480 Views

Untitledvor 0 min.
Torben Nissen01/24/15

Themeninformationen

this Topic has 2 subscriber:

Michael Wodrich (1x)
Frank Abbing (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