math:vector%

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


Description:

Find modulus for all v1 using either v2 or a static value.  If v3 is supplied copy result to v3 otherwise overwrite v1. Any vectors must contain real numbers only


Arguments:

             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


Examples:

(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 (make-vector 10 2.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