On Monday, 13 January 2025 at 11:36:45 UTC, Dakota wrote:

I want tranlate this into d without importC, what is the best way to do it?

When you say "without importC" do you mean without compiling it using importC? Because if you're able to use importC for just the translation, you can put the code in file.c and then

```
dmd -inline -c file.c -Hf=file.d
```

https://dlang.org/spec/importc.html#ctod

The snippet you've posted doesn't work because `vec2` isn't defined. It does if I add `struct vec2;`.

Reply via email to