From 4fd48c167d6f3ace681b3f011df467160a4f3dd3 Mon Sep 17 00:00:00 2001 From: Dimitri Sabadie Date: Sun, 5 Aug 2018 01:18:50 +0200 Subject: [PATCH] Hide some internal function from the public interface. --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 83313c3..542b5ed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -216,7 +216,7 @@ impl Interpolate for f32 { } // Default implementation of Interpolate::cubic_hermit. -pub fn cubic_hermite(x: (T, f32), a: (T, f32), b: (T, f32), y: (T, f32), t: f32) -> T +pub(crate) fn cubic_hermite(x: (T, f32), a: (T, f32), b: (T, f32), y: (T, f32), t: f32) -> T where T: Copy + Add + Sub + Mul + Div { // time stuff let t2 = t * t; @@ -233,7 +233,7 @@ pub fn cubic_hermite(x: (T, f32), a: (T, f32), b: (T, f32), y: (T, f32), t: f // Normalize a time ([0;1]) given two control points. #[inline(always)] -pub fn normalize_time(t: f32, cp: &Key, cp1: &Key) -> f32 { +pub(crate) fn normalize_time(t: f32, cp: &Key, cp1: &Key) -> f32 { assert!(cp1.t != cp.t); (t - cp.t) / (cp1.t - cp.t)