1.3.0 permalink Arrow_down_16x16

aset-float

clojure.core

  • (aset-float array idx val)
  • (aset-float array idx idx2 & idxv)
Sets the value at the index/indices. Works on arrays of float. Returns val.

1 Example top

  • ;; create an array of 10 floats and set one of the values to 3.1415
    
    user=> (def fs (float-array 10))
    #'user/fs
    user=> (vec fs)
    [0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0]
    user=> (aset-float fs 3 3.1415)
    3.1415
    user=> (vec fs)
    [0.0 0.0 0.0 3.1415 0.0 0.0 0.0 0.0 0.0 0.0]
    user=>
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:3499 top

(def-aset
  ^{:doc "Sets the value at the index/indices. Works on arrays of float. Returns val."
    :added "1.0"}
  aset-float setFloat float)
Vars in clojure.core/aset-float:
Used in 0 other vars

Comments top

No comments for aset-float. Log in to add a comment.