authorgravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2020-12-23 20:18:15+11:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2020-12-23 11:18:15+02:00
log53a8e7320510ab64616240ea70ea2e94fcfc02c7
tree4d40cf452f19050d921a0560a098d00e90f9c003
parent7e63f7ad0311c80bcec89649d723af8a97935ba2
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Add sincosf function (#7267)

* Add sincosf function * also add sincos Co-authored-by: Veikka Tuominen <git@vexu.eu>

1 files changed, 10 insertions(+), 0 deletions(-)

lib/std/special/c.zig+10
...@@ -634,6 +634,16 @@ export fn cosf(a: f32) f32 {...@@ -634,6 +634,16 @@ export fn cosf(a: f32) f32 {
634 return math.cos(a);634 return math.cos(a);
635}635}
636636
637export fn sincos(a: f64, r_sin: *f64, r_cos: *f64) void {
638 r_sin.* = math.sin(a);
639 r_cos.* = math.cos(a);
640}
641
642export fn sincosf(a: f32, r_sin: *f32, r_cos: *f32) void {
643 r_sin.* = math.sin(a);
644 r_cos.* = math.cos(a);
645}
646
637export fn exp(a: f64) f64 {647export fn exp(a: f64) f64 {
638 return math.exp(a);648 return math.exp(a);
639}649}