AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi Compute screen proportion

Compute screen proportion

Ein Thema von WojTec · begonnen am 21. Jul 2012 · letzter Beitrag vom 24. Jul 2012
Antwort Antwort
freeway

Registriert seit: 11. Jul 2009
57 Beiträge
 
Delphi XE Professional
 
#1

AW: Compute screen proportion

  Alt 21. Jul 2012, 16:59
not sure, if this method works for each ratio

16:9

9 / 16 = 0,5625
1 - 0,5625 = 0,4375
1 / 0,4375 = 2,2857
16 - 9 = 7
7 * 2,2857 = 15,9999 ~ 16
16 * 0,5625 = 9


5:3

3 / 5 = 0,6
1 - 0,6 = 0,4
1 / 0,4 = 2,5
5 - 3 = 2
2 * 2,5 = 5
5 * 0,6 = 3

Geändert von freeway (21. Jul 2012 um 17:03 Uhr)
  Mit Zitat antworten Zitat
Namenloser

Registriert seit: 7. Jun 2006
Ort: Karlsruhe
3.724 Beiträge
 
FreePascal / Lazarus
 
#2

AW: Compute screen proportion

  Alt 21. Jul 2012, 17:24
Well, take a look at what happens when you fill in your intermediate terms instead of using their results:

(16 - 9) * 1 / (1 - (9 / 16)) = 15,9999 ~ 16
16 * (9 / 16) = 9

So at least the second part will always work, but it’s also completely pointless since you need to know the ratio in advance for it to give the correct result

You really shouldn’t just randomly throw together expressions not knowing what you’re doing...
  Mit Zitat antworten Zitat
Antwort Antwort

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:00 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz