Loading...
Searching...
No Matches
ml::Helper Class Reference

Static debug helpers for printing SFML value types. More...

#include <Helper.h>

Static Public Member Functions

static void output (sf::FloatRect floatRect)
 Print a sf::FloatRect to stdout.
static void output (sf::Vector2f vector)
 Print a sf::Vector2f to stdout.

Detailed Description

Static debug helpers for printing SFML value types.

Helper provides lightweight console-output utilities for the two SFML types most commonly inspected during development: sf::Vector2f and sf::FloatRect. Both methods write to stdout via std::cout and are intended for debugging only — they are not used by the framework at runtime.

Usage

ml::Helper::output(myRect.getPosition());
ml::Helper::output(myRect.getGlobalBounds());
static void output(sf::Vector2f vector)
Print a sf::Vector2f to stdout.
Note
For production logging, prefer a dedicated logging library.

Definition at line 36 of file Helper.h.

Member Function Documentation

◆ output() [1/2]

void ml::Helper::output ( sf::FloatRect floatRect)
static

Print a sf::FloatRect to stdout.

Outputs the rect in the form "(left, top, width, height)\n".

Parameters
floatRectThe rect to print.

◆ output() [2/2]

void ml::Helper::output ( sf::Vector2f vector)
static

Print a sf::Vector2f to stdout.

Outputs the vector in the form "(x, y)\n".

Parameters
vectorThe vector to print.

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