Libraryless. Click here for Pure Java version (36L/1K).
1 | meta-for float in float, double { |
2 | static float clampZeroToOne(float x) { |
3 | ret x < 0 ? 0 : x > 1 ? 1 : x; |
4 | } |
5 | } |
Began life as a copy of #1018737
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1031926 |
Snippet name: | clampZeroToOne |
Eternal ID of this version: | #1031926/2 |
Text MD5: | 18da4cf858a29a53b36045dd6ea95934 |
Transpilation MD5: | 9b494db1d02ecc0047cd7c9a8eb4502a |
Author: | stefan |
Category: | javax / maths |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-08-02 04:23:05 |
Source code size: | 119 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 238 / 327 |
Version history: | 1 change(s) |
Referenced in: | [show references] |