Skip to content

Commit 53a8e73

Browse files
daurnimatorVexu
andauthored
Add sincosf function (#7267)
* Add sincosf function * also add sincos Co-authored-by: Veikka Tuominen <[email protected]>
1 parent 7e63f7a commit 53a8e73

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/std/special/c.zig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,16 @@ export fn cosf(a: f32) f32 {
634634
return math.cos(a);
635635
}
636636

637+
export 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+
642+
export 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+
637647
export fn exp(a: f64) f64 {
638648
return math.exp(a);
639649
}

0 commit comments

Comments
 (0)