0

In my RenderScript file, I have the following:

out.b = clamp(out.b, 0, 255);

When I build the project, I get the following error:

error: call to 'clamp' is ambiguous

Why is that happening ?

ebeninki
  • 909
  • 1
  • 12
  • 34

1 Answers1

1

I think it probably doesn’t know the types of the inputs. Use an explicit cast for the constants to match all the types.

If out.b is uchar: out.b = clamp(out.b, (uchar)0, (uchar)255)

sakridge
  • 578
  • 3
  • 9