|
tiny-skia-cpp
A C++20 2D rendering library (port of tiny-skia)
|
2D point / vector with float components.
#include <tiny_skia/Point.h>
Public Member Functions | |
| float | length () const |
| Euclidean length. | |
| float | distance (const Point &other) const |
| Distance to another point. | |
| bool | normalize () |
| Normalizes in-place. Returns false if zero-length. | |
| bool | setLength (float len) |
| Sets the length, preserving direction. Returns false on failure. | |
| void | rotateClockwise () |
| Rotates 90 degrees clockwise. | |
| void | rotateCounterClockwise () |
| Rotates 90 degrees counter-clockwise. | |