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

  • SEARCH
  • Home
  • 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 8354237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:29:34+00:00 2026-06-09T09:29:34+00:00

Assume I have a UISlider representing a continuous range of values from -1 to

  • 0

Assume I have a UISlider representing a continuous range of values from -1 to 2. If I leave the default min=0, max=1, then my value of 0 is represented by the slider being 1/3 of travel and a float value of 1/3 (0.33333333). I am particularly interested in the special value 0 and representing it as 0.333333 which will have to be (slightly) rounded feels wrong. If I were to change the minimum to -1 and the maximum to 2 then my 0 value is float value 0.0 exactly.

Would setting the min/max give me more accuracy? Does the thumb move on pixel boundaries – maybe I could use that information to try some rounding examples?

  • 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-06-09T09:29:36+00:00Added an answer on June 9, 2026 at 9:29 am

    I suspect you are worried about inconsequential things here. First, single-precision floats have 23 bits in their fractions, so any rounding error is less than one part in 2**24. That is hugely beyond the resolution of the screen, so no effects of rounding will be visible in the display. Second, even if you set round values for the endpoints, the slider coordinates still have to be mapped to screen pixels and vice-versa by other software, and those are likely to involve non-round values.

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

Sidebar

Related Questions

Assume you have input element: <input id=aaa type=text value=unchanged /> Then launch js script:
Assume I have two vectors represented by two arrays of type double , each
Assume I have generic list L of some type in c#. Then, using linq,
Assume I have an array: $elements = array('foo', 'bar', 'tar', 'dar'); Then I want
Assume I have a string text = A compiler translates code from a source
Assume I have a mathematical expression in a tree form in OCaml. It's represented
Assume you have a type like the following: struct Value(int v_) { static const
Assume I have the following result set from a mysql DB call (basic example,
Assume I have one matrix with two columns. Every column has thousands of values.
Assume I have a process X and then it has loaded some shared library

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.