1.3.0 permalink Arrow_down_16x16

aset-double

clojure.core

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

1 Example top

  • ;; create an array of 10 doubles and set one of the elements to 3.1415
    
    user=> (def ds (double-array 10))
    #'user/ds
    user=> (vec ds)
    [0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0]
    user=> (aset-double ds 3 3.1415)
    3.1415
    user=> (vec ds)
    [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:3504 top

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

Comments top

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