- Home /

# [Math] Projection of a Number onto a given Number Range.

I'm in a somewhat awkward situation - I guess the solution is fairly simple, yet I can't get it to work. I need to project a float number from one range (0 to 360) onto another float range ( 1 to -1). So that 0 is represented as 1, and 360 is represented as -1. (translating angle to Dot Vector).

For example: I want to project number 45.0 from the first Range (0 to 360) onto the second range ( 1 to -1) to find out it's equivalent in the second range.

How would this calculation look?

### Your answer

### Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.

### Follow this Question

### Related Questions

how to keep fraction number ??? 1 Answer

max size of a cube at irregular angles 2 Answers

C# divide float by integer 2 Answers

Trying to stop a float at a certain value. 2 Answers

How can I calculate the Vector3 b using Vector 3 a pos with an angle? 1 Answer