Skip to content

Commit

Permalink
libc: Fix fabsf signature.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc committed Jul 4, 2024
1 parent 9a8147e commit aee4bf7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions libs/math.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ func init() {
lib.Idents[cname] = types.NewIdentGo(cname, pkg+"."+fname, c.FuncTT(arg, arg, arg))
fmt.Fprintf(&buf, "%s %s(%s, %s);\n", argc, cname, argc, argc)
}
func2dfc := func(cname, name string) {
func2fc := func(cname, name string) {
func2arg("math32", name, cname, floatT, "float")
}
func2dc := func(cname, name string) {
func2arg("math", name, cname, doubleT, "double")
}
func2dfc := func(cname, name string) {
func2dc(cname, name)
// TODO: add Round to maze.io/x/math32
if cname == "round" {
fmt.Fprintf(&buf, "#define %sf(x) %s(x)\n", name, name)
Expand Down Expand Up @@ -80,8 +86,8 @@ func init() {
func2df("round")
func2df("ceil")
func2df("floor")
func2dfc("fabs", "abs")
func2dfc("fabsf", "abs")
func2dc("fabs", "abs")
func2fc("fabsf", "abs")
func3df("pow")
func2df("sqrt")
func2df("exp")
Expand Down

0 comments on commit aee4bf7

Please sign in to comment.