Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codenameone/CodenameOne
/ clamp
Method
clamp
CodenameOne/src/com/codename1/ui/CSSColor.java:136–144 ·
view source on GitHub ↗
(int v)
Source
from the content-addressed store, hash-verified
134
}
135
136
private
static
int
clamp(
int
v) {
137
if
(v < 0) {
138
return
0;
139
}
140
if
(v > 255) {
141
return
255;
142
}
143
return
v;
144
}
145
146
private
static
float parseFloat(String s) {
147
return
Float.parseFloat(s.trim());
Callers
1
parse
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected