Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3608406
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:29:50+00:00 2026-05-18T21:29:50+00:00

Very simple math question. Say I have an image with a point being tracked

  • 0

Very simple math question.

Say I have an image with a point being tracked in it. Here are my variables:

Image Height
Image Width
Point (pixles from left) coordinate X
Point (pixles from top) coordinate Y

For example the width, I want it to return a value of -0.5, which represents the distance from the center, such that 1 would be the total right, and -1 would be the total left.

So, how would I calculate so that

The point was (width) a quarter way across the entire frame, or a half way across the left SIDE of the frame. The variables would equal:

Image width: 40
Point X: 10

I know this is basic, but I seriously am having a mind cramp right now O_o.

Thanks,
Christian

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:29:51+00:00Added an answer on May 18, 2026 at 9:29 pm
    Xnew = 2*X/Width - 1
    Ynew = 2*Y/Height - 1
    

    Explanation:

    X/Width gives you value from 0 (total left) to 1 (total right). 2*X/Width then gives a value from 0 (total left) to 2 (total right). Subtract 1 to get a value from -1 (total left) to 1 (total right).

    The same for Y.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Very simple question, is there any cloud server enviroments avaliable these days for us
I have a very simple problem which requires a very quick and simple solution
Below I have a very simple example of what I'm trying to do. I
I have a very simple WPF application in which I am using data binding
Here's a very simple Prototype example. All it does is, on window load, an
Very simple question. Take a look at the code below. It's a very simple
This is my first question on S.O. I have a very odd problem. Below
Very simple question, but I want to start using a consistent naming convention for
Very simple question - how might I iterate through a NSMutableArray and do things
This is probably a very stupid math question, but i can't seem to figure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.