commit 53a8e7320510ab64616240ea70ea2e94fcfc02c7 (tree) parent 7e63f7ad0311c80bcec89649d723af8a97935ba2 Author: daurnimator <quae@daurnimator.com> Date: Wed, 23 Dec 2020 20:18:15 +1100 Add sincosf function (#7267) * Add sincosf function * also add sincos Co-authored-by: Veikka Tuominen <git@vexu.eu> Diffstat:
| M | lib/std/special/c.zig | | | 10 | ++++++++++ |
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/lib/std/special/c.zig b/lib/std/special/c.zig @@ -634,6 +634,16 @@ export fn cosf(a: f32) f32 { return math.cos(a); } +export fn sincos(a: f64, r_sin: *f64, r_cos: *f64) void { + r_sin.* = math.sin(a); + r_cos.* = math.cos(a); +} + +export fn sincosf(a: f32, r_sin: *f32, r_cos: *f32) void { + r_sin.* = math.sin(a); + r_cos.* = math.cos(a); +} + export fn exp(a: f64) f64 { return math.exp(a); }