Libraryless. Click here for Pure Java version (39L/1K).
meta-for float in float, double { static float clampToZeroOne(float x) { ret x < 0 ? 0 : x > 1 ? 1 : x; } }
Began life as a copy of #1031926
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035289 |
Snippet name: | clampToZeroOne - synonym of clampZeroToOne |
Eternal ID of this version: | #1035289/1 |
Text MD5: | 069d49269c004ae0af024181344ce059 |
Transpilation MD5: | ea8b9bbc2c9a0ec0d37b290caf2c6505 |
Author: | stefan |
Category: | javax / maths |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-04-29 01:41:52 |
Source code size: | 119 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 177 / 233 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |