pub trait Trigonometric {
Show 23 methods // Required methods fn sin(&self) -> Self; fn sin_e(&self) -> Result<Result, Value>; fn cos(&self) -> Self; fn cos_e(&self) -> Result<Result, Value>; fn sf_hypot(&self, y: f64) -> Self; fn sf_hypot_e(&self, y: f64) -> Result<Result, Value>; fn sinc(&self) -> Self; fn sinc_e(&self) -> Result<Result, Value>; fn complex_sin_e(&self, zi: f64) -> Result<(Result, Result), Value>; fn complex_cos_e(&self, zi: f64) -> Result<(Result, Result), Value>; fn complex_logsin_e(&self, zi: f64) -> Result<(Result, Result), Value>; fn lnsinh(&self) -> Self; fn lnsinh_e(&self) -> Result<Result, Value>; fn lncosh(&self) -> Self; fn lncosh_e(&self) -> Result<Result, Value>; fn polar_to_rect(&self, theta: f64) -> Result<(Result, Result), Value>; fn rect_to_polar(&self, y: f64) -> Result<(Result, Result), Value>; fn angle_restrict_symm(&self) -> Self; fn angle_restrict_symm_e(&mut self) -> Result<(), Value>; fn angle_restrict_pos(&self) -> Self; fn angle_restrict_pos_e(&mut self) -> Result<(), Value>; fn sin_err_e(&self, dx: f64) -> Result<Result, Value>; fn cos_err_e(&self, dx: f64) -> Result<Result, Value>;
}

Required Methods§

source

fn sin(&self) -> Self

This routine computes the sine function \sin(x).

source

fn sin_e(&self) -> Result<Result, Value>

This routine computes the sine function \sin(x).

source

fn cos(&self) -> Self

This routine computes the cosine function \sin(x).

source

fn cos_e(&self) -> Result<Result, Value>

This routine computes the cosine function \sin(x).

source

fn sf_hypot(&self, y: f64) -> Self

This routine computes the hypotenuse function \sqrt{x^2 + y^2} avoiding overflow and underflow.

source

fn sf_hypot_e(&self, y: f64) -> Result<Result, Value>

This routine computes the hypotenuse function \sqrt{x^2 + y^2} avoiding overflow and underflow.

source

fn sinc(&self) -> Self

This routine computes \sinc(x) = \sin(\pi x) / (\pi x) for any value of x.

source

fn sinc_e(&self) -> Result<Result, Value>

This routine computes \sinc(x) = \sin(\pi x) / (\pi x) for any value of x.

source

fn complex_sin_e(&self, zi: f64) -> Result<(Result, Result), Value>

This function computes the complex sine, \sin(z_r + i z_i) storing the real and imaginary parts in szr, szi.

source

fn complex_cos_e(&self, zi: f64) -> Result<(Result, Result), Value>

This function computes the complex cosine, \cos(z_r + i z_i) storing the real and imaginary parts in czr, czi.

source

fn complex_logsin_e(&self, zi: f64) -> Result<(Result, Result), Value>

This function computes the logarithm of the complex sine, \log(\sin(z_r + i z_i)) storing the real and imaginary parts in lszr, lszi.

source

fn lnsinh(&self) -> Self

This routine computes \log(\sinh(x)) for x > 0.

source

fn lnsinh_e(&self) -> Result<Result, Value>

This routine computes \log(\sinh(x)) for x > 0.

source

fn lncosh(&self) -> Self

This routine computes \log(\cosh(x)) for x > 0.

source

fn lncosh_e(&self) -> Result<Result, Value>

This routine computes \log(\cosh(x)) for x > 0.

source

fn polar_to_rect(&self, theta: f64) -> Result<(Result, Result), Value>

This function converts the polar coordinates (r,theta) to rectilinear coordinates (x,y), x = r\cos(\theta), y = r\sin(\theta).

source

fn rect_to_polar(&self, y: f64) -> Result<(Result, Result), Value>

This function converts the rectilinear coordinates (x,y) to polar coordinates (r,theta), such that x = r\cos(\theta), y = r\sin(\theta). The argument theta lies in the range [-\pi, \pi].

source

fn angle_restrict_symm(&self) -> Self

This routine forces the angle theta to lie in the range (-\pi,\pi].

Note that the mathematical value of \pi is slightly greater than M_PI, so the machine numbers M_PI and -M_PI are included in the range.

source

fn angle_restrict_symm_e(&mut self) -> Result<(), Value>

This routine forces the angle theta to lie in the range (-\pi,\pi].

Note that the mathematical value of \pi is slightly greater than M_PI, so the machine numbers M_PI and -M_PI are included in the range.

source

fn angle_restrict_pos(&self) -> Self

This routine forces the angle theta to lie in the range [0, 2\pi).

Note that the mathematical value of 2\pi is slightly greater than 2M_PI, so the machine number 2M_PI is included in the range.

source

fn angle_restrict_pos_e(&mut self) -> Result<(), Value>

This routine forces the angle theta to lie in the range [0, 2\pi).

Note that the mathematical value of 2\pi is slightly greater than 2M_PI, so the machine number 2M_PI is included in the range.

source

fn sin_err_e(&self, dx: f64) -> Result<Result, Value>

This routine computes the sine of an angle x with an associated absolute error dx, \sin(x \pm dx).

Note that this function is provided in the error-handling form only since its purpose is to compute the propagated error.

source

fn cos_err_e(&self, dx: f64) -> Result<Result, Value>

This routine computes the cosine of an angle x with an associated absolute error dx, \cos(x \pm dx).

Note that this function is provided in the error-handling form only since its purpose is to compute the propagated error.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Trigonometric for f64

Implementors§