1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 12:20:26 +02:00

(scm_random_solid_sphere_x): Use scm_c_generalized_vector_length

instead of scm_uniform_vector_length.
This commit is contained in:
Marius Vollmer 2005-01-17 17:22:22 +00:00
parent 7719cbe989
commit f160e70907

View file

@ -506,7 +506,7 @@ SCM_DEFINE (scm_random_solid_sphere_x, "random:solid-sphere!", 1, 1, 0,
scm_random_normal_vector_x (v, state); scm_random_normal_vector_x (v, state);
vector_scale_x (v, vector_scale_x (v,
pow (scm_c_uniform01 (SCM_RSTATE (state)), pow (scm_c_uniform01 (SCM_RSTATE (state)),
1.0 / scm_to_int (scm_uniform_vector_length (v))) 1.0 / scm_c_generalized_vector_length (v))
/ sqrt (vector_sum_squares (v))); / sqrt (vector_sum_squares (v)));
return SCM_UNSPECIFIED; return SCM_UNSPECIFIED;
} }