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 862351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:07:38+00:00 2026-05-15T09:07:38+00:00

I’m programming a knob that has an arrow the position of which is defined

  • 0

I’m programming a knob that has an arrow the position of which is defined from an arc number.

I’m looking to find a way to convert this arc number to a number that will represent a temperature.

The minimum the arc number will be is 1.3 and the maximum will be 1.7.

1.3 needs to equal 40 and 1.7 needs to equal 99.

Is this possible?

  • 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-15T09:07:39+00:00Added an answer on May 15, 2026 at 9:07 am

    If it’s linear, you can use the following formula to allow for any minimum and maximum:

    from_min = -1.3
    from_max = 1.7
    to_min = 40
    to_max = 99
    from = <whatever value you want to convert>
    to = (from - from_min) * (to_max - to_min) / (from_max - from_min) + to_min
    

    The * (to_max - to_min) / (from_max - from_min) bit scales the range from the from range to the to range. Subtracting from_min before and adding to_min after locates the correct point within the to range.

    Examples, first the original:

    (1.3..1.7) -> (40..99)
    to = (from - from_min) * (to_max - to_min) / (from_max - from_min) + to_min
       = (from - 1.3)      * 59                / 0.4                   + 40
       = (from - 1.3) * 147.5 + 40 (same as Ignacio)
       = from * 147.5 - 151.75     (same as Zebediah using expansion)
    

    Then the one using -1.3 as the lower bound as mentioned in one of your comments:

    (-1.3..1.7) -> (40..99)
    to = (from - from_min) * (to_max - to_min) / (from_max - from_min) + to_min
       = (from - -1.3)      * 59                / 3                    + 40
       = (from + 1.3) * 19.67 + 40
    

    This answer (and all the others to date of course) assume that it is a linear function. That’s by no means clear based on your use of words like “arc” and “knob” in the question. You may need some trigonometry (sines, cosines and such) if it turns out linear doesn’t suffice.

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

Sidebar

Related Questions

Programming has come a long way. I am still relatively young (first Computer: C64),
Programming Language I am using : PHP I have 30 results from database, which
Programming Question First (from w3 schools) The programming example way below (from W3 schools)
Programming language: Java Ok, so I want to have a BufferedImage that keeps rotating
Programming is (so far) just a hobby for me, so I try to find
Programming language books usually explain that value types are created on the stack, and
My programming background comes from C and some C++ programming with strong emphasis on
Android programming. I have a json returning the date from a database as a
Programming in Java, what's the better way to create resource files to save the
Programming in a sense is easy. But bugs are something which always makes more

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.