diff options
Diffstat (limited to 'rotord/src/rotor.h')
| -rwxr-xr-x | rotord/src/rotor.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index ac11b9c..62dfb39 100755 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -174,6 +174,15 @@ namespace Rotor { g=(uint8_t)ofHexToChar(s.substr(2,2)); b=(uint8_t)ofHexToChar(s.substr(4,2)); } + float Rfloat(){ + return ((float)r)/255.0f; + } + float Gfloat(){ + return ((float)g)/255.0f; + } + float Bfloat(){ + return ((float)b)/255.0f; + } uint8_t r,g,b; }; |
