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

Method float_array

src/jvm/clojure/lang/Numbers.java:1206–1222  ·  view source on GitHub ↗
(int size, Object init)

Source from the content-addressed store, hash-verified

1204}
1205
1206 @WarnBoxedMath(false)
1207 static public float[] float_array(int size, Object init){
1208 float[] ret = new float[size];
1209 if(init instanceof Number)
1210 {
1211 float f = ((Number) init).floatValue();
1212 for(int i = 0; i < ret.length; i++)
1213 ret[i] = f;
1214 }
1215 else
1216 {
1217 ISeq s = RT.seq(init);
1218 for(int i = 0; i < size && s != null; i++, s = s.next())
1219 ret[i] = ((Number) s.first()).floatValue();
1220 }
1221 return ret;
1222 }
1223
1224 @WarnBoxedMath(false)
1225 static public float[] float_array(Object sizeOrSeq){

Callers

nothing calls this directly

Calls 6

seqMethod · 0.95
nextMethod · 0.95
firstMethod · 0.95
countMethod · 0.95
floatValueMethod · 0.45
intValueMethod · 0.45

Tested by

no test coverage detected