Owner: P5 Editor porting project
API: P5 (r2)
World type: No Mind
Use the map() function to take any number and scale it to a * new number that is more useful for the project that you are working on. * For example, use the numbers from the mouse position to control the size or color of a shape. * In this example, the mouses x-coordinate (numbers between 0 and 360) are scaled to new numbers * to define the color and size of a circle.
Type: Public. Plain source code.
View source code.
Get Embed code.
Get New window embed code.
Get Autorun embed code.
5 runs
| Run | |
| Edit | Must be logged in. |
| Update image | Must be logged in. |
| Clone | Must be logged in. |
| New Mind | Only valid for Worlds that use Minds. |
| Change World type | Must be owner. |
| Change API | Must be owner. |
| Delete | Must be owner. |