MCPcopy Index your code
hub / github.com/clojure/clojure / floatCast

Method floatCast

src/jvm/clojure/lang/RT.java:1333–1343  ·  view source on GitHub ↗
(Object x)

Source from the content-addressed store, hash-verified

1331}
1332
1333static public float floatCast(Object x){
1334 if(x instanceof Float)
1335 return ((Float) x).floatValue();
1336
1337 double n = ((Number) x).doubleValue();
1338 if(n < -Float.MAX_VALUE || n > Float.MAX_VALUE)
1339 throw new IllegalArgumentException("Value out of range for float: " + x);
1340
1341 return (float) n;
1342
1343}
1344
1345static public float floatCast(byte x){
1346 return x;

Callers 15

coerceAdapterReturnMethod · 0.95
invokeFMethod · 0.95
invokeLFMethod · 0.95
invokeDFMethod · 0.95
invokeOFMethod · 0.95
invokeLLFMethod · 0.95
invokeLOFMethod · 0.95
invokeOLFMethod · 0.95
invokeDDFMethod · 0.95
invokeLDFMethod · 0.95
invokeDLFMethod · 0.95
invokeOOFMethod · 0.95

Calls 2

floatValueMethod · 0.45
doubleValueMethod · 0.45

Tested by

no test coverage detected