diff --git a/src/dvec.rs b/src/dvec.rs index 7931543d..bbfe1ed1 100644 --- a/src/dvec.rs +++ b/src/dvec.rs @@ -175,8 +175,9 @@ impl> Neg> for DVec { } impl DVec { + /// Will change soon. #[inline] - fn dot(&self, other: &DVec) -> N { + pub fn dot(&self, other: &DVec) -> N { assert!(self.at.len() == other.at.len()); let mut res: N = Zero::zero(); @@ -188,8 +189,9 @@ impl DVec { res } + /// Will change soon. #[inline] - fn sub_dot(&self, a: &DVec, b: &DVec) -> N { + pub fn sub_dot(&self, a: &DVec, b: &DVec) -> N { let mut res: N = Zero::zero(); for i in range(0u, self.at.len()) { @@ -271,18 +273,21 @@ impl + Neg + Clone> Translation> for DVec { } impl DVec { + /// Will change soon. #[inline] - fn sqnorm(&self) -> N { + pub fn sqnorm(&self) -> N { self.dot(self) } + /// Will change soon. #[inline] - fn norm(&self) -> N { + pub fn norm(&self) -> N { self.sqnorm().sqrt() } + /// Will change soon. #[inline] - fn normalized(&self) -> DVec { + pub fn normalized(&self) -> DVec { let mut res : DVec = self.clone(); res.normalize(); @@ -290,8 +295,9 @@ impl DVec { res } + /// Will change soon. #[inline] - fn normalize(&mut self) -> N { + pub fn normalize(&mut self) -> N { let l = self.norm(); for i in range(0u, self.at.len()) {