Results 1 to 3 of 3
Like Tree1Thanks
  • 1 Post By romsek

Thread: How to Determine Data Ratio Value

  1. #1
    Newbie
    Joined
    Dec 2018
    From
    Seattle
    Posts
    2

    How to Determine Data Ratio Value

    I'm coding a website using HTML and JavaScript, and the source code I have uses a data-ratio value to determine the size of an image. My question is, how do I determine this value based on the dimensions of my image?

    <div class='slide template1' data-ratio='1.44' data-background='#fff'><img src='img/filename.jpg' width='1800' height='1250' alt='' /></div>

    If my dimensions are 1800 x 1250, how do I calculate a value like 1.44?

    After experimenting with this code, a square image has a data-ratio of 1.0. Also, a tall, vertical image has a ratio of LESS than 1.
    <div class='slide template1' data-ratio='.7'data-background='#fff'><img src='img/vertical-image.jpg' width='1000' height='1500' alt='' /></div>
    Is anyone familiar with this data-ratio value and how to calculate it?

    Thanks!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Nov 2013
    From
    California
    Posts
    6,519
    Thanks
    2863

    Re: How to Determine Data Ratio Value

    $1.44 = \dfrac{1800}{1250}$

    so I'm gonna guess the number you're after is $\dfrac{w}{h}$
    Thanks from topsquark
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Dec 2018
    From
    Seattle
    Posts
    2

    Re: How to Determine Data Ratio Value

    Well, there you go! Simple as that!

    Thanks so much and Happy Holidays.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Using product buy count data to determine popularity.
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: Dec 22nd 2011, 05:07 PM
  2. Replies: 0
    Last Post: May 9th 2011, 12:27 PM
  3. Handling Data - mean and ratio
    Posted in the Algebra Forum
    Replies: 1
    Last Post: May 3rd 2010, 06:24 AM
  4. How do I determine whether my data are normal?
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: May 17th 2009, 02:13 PM

Search Tags


/mathhelpforum @mathhelpforum