libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
Utils.h File Reference
#include <string>
#include <vector>
#include <sstream>
Include dependency graph for Utils.h:

Go to the source code of this file.

Namespaces

namespace  Ship
 Core namespace for the libultraship engine framework.
 
namespace  Ship::Math
 Lightweight math utility functions used throughout the engine.
 

Functions

float Ship::Math::clamp (float d, float min, float max)
 Clamps d to the inclusive range [min, max].
 
size_t Ship::Math::HashCombine (size_t lhs, size_t rhs)
 Combines two size_t hash values into a single hash.
 
template<typename Numeric >
bool Ship::Math::IsNumber (const std::string &s)
 Returns true if s represents a valid number of type Numeric.
 
std::vector< std::string > Ship::splitText (const std::string &text, char separator, bool keepQuotes)
 Splits text at each separator character, optionally preserving quoted spans.
 
std::string Ship::toLowerCase (std::string in)
 Returns a copy of in with all ASCII letters converted to lower case.