Jenkin W.

asked • 08/30/23

what is the right x value?

"Calculator to figure out the x value of an image box based on direction, display width, and the amount of pixels that you don't use (the empty spaces on either side of the screen combined). a_unused is the amount of pixels that you didn't use on both sides combined. d_width is the amount of pixels in the width of the screen. d_direction is the direction, where -100 = 100% Left and +100 = 100% Right."


Formulas: a_used = d_width – a_unused


x = (a_used/2) + (a_used * ((d_direction/100) / 2)) + (a_unused/2)


Question: Why does this formula not work? (For example, if I enter a direction that is negative and should show on the left side, it shows on the right side.)

Riti B.

Hi Jenkin! Could you elaborate on what "x value" is measuring? For example, is it the width of the image box (# of pixels)? Or is it the x coordinate where the image box should start (e.g., to start at the left side of the screen, x = 0)? Also, the way a_unused is labeled brought up another question: Is a_unused the # of unused pixels in **just the width** of the screen, or is it the **area** of unused pixels (that is, unused width * height of the screen) to the left and right of the image box? If it's the latter, you wouldn't really be able to use the first formula (a_used = d_width - a_unused), correct?
Report

09/05/23

Jenkin W.

Hello, x value measures the x coordinate where image box should start and a_unused is the amount of unused pixels in the width of the screen on both sides of the screen combined (left and right).
Report

09/08/23

James S.

tutor
Is this for a calculator or a computer? Which type? TI 84?84? Casio?
Report

09/10/23

James S.

tutor
So X is just an adjusted origin? What formula do you use for an actual pixel to be graphed?
Report

09/10/23

James S.

tutor
Left of what? The y-axis?
Report

09/10/23

1 Expert Answer

By:

Mitchell R. answered • 09/11/23

Tutor
New to Wyzant

Hey! I'd love to help with all of your tutoring needs!

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.