How can I create a line proportional to windowWidth and Height

Hey, I thought it would be pretty simple to create a line which is proportional to the screen, however it didnt work! I tried: line(windowWidth/20,windowHeight/0,windowWidth/35,windowHeight/25); however it didnt work. Please help!

Answers

  • Answer ✓

    Sorry... stupid question. Got it working lol.

  • edited August 2015 Answer ✓

    you could also use map() when you want to calculate a value from one range to another range proportionally (keeping its percentage within both ranges)

Sign In or Register to comment.