Function glm::ext::sin_cos [] [src]

pub fn sin_cos<F: BaseFloat, T: GenFloat<F>>(x: T) -> (T, T)

Simultaneously computes the sine and cosine of x, returns (sin(x), cos(x)).

Example

use glm::*;
use glm::ext::*;

let v = vec2(0., half_pi());
let (s, c) = sin_cos(v);
assert!(is_approx_eq(&s, &vec2(0., 1.)));
assert!(is_approx_eq(&c, &vec2(1., 0.)));