diff options
author | Daniel Llorens <daniel.llorens@bluewin.ch> | 2013-04-09 18:09:49 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2014-01-27 21:45:17 +0100 |
commit | 5a4f40f9036d873b4f0766da1bddc6a798e1d801 (patch) | |
tree | 1fc2ce9973f2a33690bad022cb90dfafa5967d06 | |
parent | b370eedc5edcc88386ffda3d78e9351e783a75a0 (diff) | |
download | guile-5a4f40f9036d873b4f0766da1bddc6a798e1d801.tar.gz |
Replace scm_c_generalized_vector_length in random.c
* libguile/random.c: (random:solid-sphere!): array is of known
rank 1, so use scm_c_array_length() instead.
-rw-r--r-- | libguile/random.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/random.c b/libguile/random.c index c0b04bc05..6df2cd9df 100644 --- a/libguile/random.c +++ b/libguile/random.c @@ -582,13 +582,13 @@ SCM_DEFINE (scm_random_solid_sphere_x, "random:solid-sphere!", 1, 1, 0, scm_random_normal_vector_x (v, state); vector_scale_x (v, pow (scm_c_uniform01 (SCM_RSTATE (state)), - 1.0 / scm_c_generalized_vector_length (v)) + 1.0 / scm_c_array_length (v)) / sqrt (vector_sum_squares (v))); return SCM_UNSPECIFIED; } #undef FUNC_NAME -SCM_DEFINE (scm_random_hollow_sphere_x, "random:hollow-sphere!", 1, 1, 0, +SCM_DEFINE (scm_random_hollow_sphere_x, "random:hollow-sphere!", 1, 1, 0, (SCM v, SCM state), "Fills vect with inexact real random numbers\n" "the sum of whose squares is equal to 1.0.\n" |