(math:vector<= v1 [v2 | val] [v3])


Check if v1 is smaller or equal to v2 for all values of v1.  If v3 is supplied copy result to v3 otherwise overwrite v1.  Any vectors must contain real numbers only


             v1 -- vector

             v3 -- optional vector to place result. must be at least equal in length to the expected result

       v2 | val -- vector of equal length to v1 or a single value to use for each vector position

Returns: boolean


(define v1 (vector 1.0 2.0 3.0 4.0 -5.0 6.0 7.0 8.0 9.0 10.0))

(define v2 (vector 1.0 3.0 2.0 4.0 5.0  7.5 7.6 8.5 9.0 10.0))

(define v3 (make-vector 10))

(print v1 v2 v3)

; put result in v3

(math:vector<= v1 v2 v3)

(print v1 v2 v3)

; put result in v1

(math:vector<= v1 3.0)

(print v1 v2 v3)

; put result in v3

(math:vector<= v1 -1.0 v3)

(print v1 v2 v3)

Back to index