From 3ab06faef6f008fcc025e329b006c425e29076c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Sun, 8 Sep 2013 16:03:03 +0200 Subject: [PATCH] Implement `UnitSphereSample` for `Vec1`. --- src/vec_spec.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vec_spec.rs b/src/vec_spec.rs index f832e903..a509921c 100644 --- a/src/vec_spec.rs +++ b/src/vec_spec.rs @@ -179,6 +179,13 @@ static SAMPLES_3_F64: [Vec3, ..42] = [ Vec3 { x: 0.162456 , y: 0.499995 , z: 0.850654 } ]; +impl UniformSphereSample for Vec1 { + #[inline(always)] + fn sample(f: &fn(Vec1)) { + f(One::one()) + } +} + impl UniformSphereSample for Vec2 { #[inline(always)] fn sample(f: &fn(Vec2)) {