Skip to content

Commit 2aa23f7

Browse files
committed
Merge branch 'features/trait' into dev
2 parents 984f227 + 064988a commit 2aa23f7

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/traits/num.rs

+10-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ pub trait PowOps: Sized {
3838

3939
pub trait TrigOps: Sized + Div<Output = Self> {
4040
fn sin_cos(&self) -> (Self, Self);
41-
fn sinh_cosh(&self) -> (Self, Self);
4241
fn sin(&self) -> Self {
4342
let (s, _) = self.sin_cos();
4443
s
@@ -51,9 +50,7 @@ pub trait TrigOps: Sized + Div<Output = Self> {
5150
let (s, c) = self.sin_cos();
5251
s / c
5352
}
54-
fn asin(&self) -> Self;
55-
fn acos(&self) -> Self;
56-
fn atan(&self) -> Self;
53+
fn sinh_cosh(&self) -> (Self, Self);
5754
fn sinh(&self) -> Self {
5855
let (s, _) = self.sinh_cosh();
5956
s
@@ -66,9 +63,18 @@ pub trait TrigOps: Sized + Div<Output = Self> {
6663
let (s, c) = self.sinh_cosh();
6764
s / c
6865
}
66+
fn asin(&self) -> Self;
67+
fn acos(&self) -> Self;
68+
fn atan(&self) -> Self;
69+
fn asin_acos(&self) -> (Self, Self) {
70+
(self.asin(), self.acos())
71+
}
6972
fn asinh(&self) -> Self;
7073
fn acosh(&self) -> Self;
7174
fn atanh(&self) -> Self;
75+
fn asinh_acosh(&self) -> (Self, Self) {
76+
(self.asinh(), self.acosh())
77+
}
7278
}
7379

7480
pub trait ExpLogOps: Sized {

0 commit comments

Comments
 (0)