Showing the changes to notes (1 of 2 files). Show all
Unified · Split
| @@ -46,8 +46,13 @@ to be in BETA for some time (as we add more and also teach using chAI in · 45 unmodified lines | ||
| 46 | 46 | - (added) Math functions |
| 47 | 47 | float map( float value, float x1, float y1, |
| 48 | 48 | float x2, float y2 ); |
| 49 | − Map 'value' from range [x1,y1] into range [x2,y2]; | |
| 50 | − 'value' will be clamped to [x1,y1] if outside range. | |
| 49 | + Map 'value' from range [x1,y1] into range [x2,y2]; 'value' | |
| 50 | + can be outside range[x1,y1]. | |
| 51 | + float map2( float value, float x1, float y1, | |
| 52 | + float x2, float y2 ); | |
| 53 | + Map 'value' from range [x1,y1] into range [x2,y2]; 'value' | |
| 54 | + will be clamped to [x1,y1] if outside range. | |
| 55 | + (Math.remap() is the same as Math.map2()) | |
| 51 | 56 | float clampi( int value, int min, int max ); |
| 52 | 57 | Clamp integer 'value' to range [min, max]. |
| 53 | 58 | float clampf( float value, float min, float max ); |