'+---------------+---------------------------------------------------+
'| ###### ###### |     .--. .         .-.                            |
'| ##  ## ##   # |     |   )|        (   ) o                         |
'| ##  ##  ##    |     |--' |--. .-.  `-.  .  .-...--.--. .-.        |
'| ######   ##   |     |  \ |  |(   )(   ) | (   ||  |  |(   )       |
'| ##      ##    |     '   `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |
'| ##     ##   # |                            ._.'                   |
'| ##     ###### |  Sources & Documents placed in the Public Domain. |
'+---------------+---------------------------------------------------+
'|                                                                   |
'| === converthelper.bm ===                                          |
'|                                                                   |
'| == Some useful SUBs and FUNCTIONs to convert point coordinates    |
'| == and some more to convert colors between colorspace models.     |
'|                                                                   |
'+-------------------------------------------------------------------+
'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |
'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |
'| any questions or suggestions. Thanx for your interest in my work. |
'+-------------------------------------------------------------------+

Convert point coordinates


Following are some functions to convert the coordinates of a given point between the carthesian and polar system. Also available are functions to move or rotate a point to a new position. Note that the x/y coordinates precision is limited to integers, as the intended use is for converting pixel positions on screen, not for theoretical exact math.


Table of Contents

SYSTEM CONVERSION

POINT CONVERSION

 

 

Colorspace functions


Following are functions to convert color values between the RGB and HSB/HSV colorspace and some convenience functions for the HSB/HSV colorspace, which mimic the respective RGB colorspace functions provided by QB64 itself.


Table of Contents

HSB/HSV CONVENIENCE FUNCTIONS

RAW COLOR CONVERSION