#1572 Fixes change in behavior cause by passing resolution as an integer...

... to the scalar encoder.

Resolves #1572
No but I think it makes the code easier to understand.