Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Help and Support
  3. convert negative numbers to positive, and back again.

convert negative numbers to positive, and back again.

Scheduled Pinned Locked Moved Help and Support
2 Posts 2 Posters 431 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Deeeds
    wrote on last edited by
    #1

    I have two input values that I'm never sure if they're going to be negative or positive.

    However I need to perform an operation on them (constantly) to impact a third value. This operation needs them to be both positive.

    How do I convert the two incoming numbers to positive, operate on them, and then restore them to negative, and use them again as they were, regardless of whether or not they come into me as positive or negative?

    Jack de WildeJ 1 Reply Last reply
    0
    • D Deeeds

      I have two input values that I'm never sure if they're going to be negative or positive.

      However I need to perform an operation on them (constantly) to impact a third value. This operation needs them to be both positive.

      How do I convert the two incoming numbers to positive, operate on them, and then restore them to negative, and use them again as they were, regardless of whether or not they come into me as positive or negative?

      Jack de WildeJ Offline
      Jack de WildeJ Offline
      Jack de Wilde
      wrote on last edited by
      #2

      @Deeeds to convert to a positive you could multiply the number by itself and then square root it, or for slightly better performance, multiply by -1 if its less than 0 and use a set input field. You should be able to still use the original value after.

      1 Reply Last reply
      1

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Search