tiny-skia-cpp
A C++20 2D rendering library (port of tiny-skia)
Loading...
Searching...
No Matches
tiny_skia::Point Struct Reference

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.
 

The documentation for this struct was generated from the following file: