--- a/rust/integral-geometry/src/lib.rs Tue Nov 06 16:23:43 2018 +0300
+++ b/rust/integral-geometry/src/lib.rs Tue Nov 06 16:40:54 2018 +0300
@@ -88,13 +88,13 @@
}
#[inline]
- pub fn tangent(self) -> i32 {
- self.y / self.x
+ pub fn tangent_mul(self, x: i32) -> i32 {
+ x * self.y / self.x
}
#[inline]
- pub fn cotangent(self) -> i32 {
- self.x / self.y
+ pub fn cotangent_mul(self, y: i32) -> i32 {
+ y * self.x / self.y
}
#[inline]
@@ -595,13 +595,13 @@
}
#[inline]
- pub fn tangent(&self) -> i32 {
- self.direction.tangent()
+ pub fn tangent_mul(&self, x: i32) -> i32 {
+ self.direction.tangent_mul(x)
}
#[inline]
- pub fn cotangent(&self) -> i32 {
- self.direction.cotangent()
+ pub fn cotangent_mul(&self, y: i32) -> i32 {
+ self.direction.cotangent_mul(y)
}
#[inline]