roo_quantity
API Documentation for roo_quantity
Loading...
Searching...
No Matches
roo_quantity::Velocity Class Reference

Representation of velocity, internally stored as floating-point meters per second. More...

#include <velocity.h>

Public Member Functions

 Velocity ()
 Creates a velocity object representing an 'unknown' velocity.
 
float inKilometersPerSecond () const
 Returns the velocity in kilometers per second.
 
float inKilometersPerHour () const
 Returns the velocity in kilometers per hour.
 
float inKph () const
 Returns the velocity in kilometers per hour.
 
float inMetersPerSecond () const
 Returns the velocity in meters per second.
 
float inMillimetersPerSecond () const
 Returns the velocity in millimeters per second.
 
float inMicrometersPerSecond () const
 Returns the velocity in micrometers per second.
 
float inMilesPerHour () const
 Returns the velocity in miles per hour.
 
float inMph () const
 Returns the velocity in miles per hour.
 
float inKnots () const
 
bool isUnknown () const
 Returns whether the object represents an unknown velocity.
 
bool operator< (const Velocity &other) const
 
bool operator== (const Velocity &other) const
 
bool operator> (const Velocity &other) const
 
bool operator<= (const Velocity &other) const
 
bool operator>= (const Velocity &other) const
 
bool operator!= (const Velocity &other) const
 
Velocityoperator+= (const Velocity &other)
 
Velocityoperator-= (const Velocity &other)
 
Velocityoperator*= (float multi)
 
Velocityoperator/= (float div)
 

Friends

Velocity UnknownVelocity ()
 Returns a velocity object representing an unknown velocity.
 
Velocity VelocityInMetersPerSecond (float)
 Returns a velocity object equivalent to the specified velocity expressed in meters per second.
 

Detailed Description

Representation of velocity, internally stored as floating-point meters per second.

Definition at line 22 of file velocity.h.

Constructor & Destructor Documentation

◆ Velocity()

roo_quantity::Velocity::Velocity ( )
inline

Creates a velocity object representing an 'unknown' velocity.

Definition at line 25 of file velocity.h.

Member Function Documentation

◆ inKilometersPerHour()

float roo_quantity::Velocity::inKilometersPerHour ( ) const
inline

Returns the velocity in kilometers per hour.

Definition at line 31 of file velocity.h.

Referenced by inKph().

◆ inKilometersPerSecond()

float roo_quantity::Velocity::inKilometersPerSecond ( ) const
inline

Returns the velocity in kilometers per second.

Definition at line 28 of file velocity.h.

◆ inKnots()

float roo_quantity::Velocity::inKnots ( ) const
inline

Definition at line 51 of file velocity.h.

◆ inKph()

float roo_quantity::Velocity::inKph ( ) const
inline

Returns the velocity in kilometers per hour.

Definition at line 34 of file velocity.h.

References inKilometersPerHour().

◆ inMetersPerSecond()

◆ inMicrometersPerSecond()

float roo_quantity::Velocity::inMicrometersPerSecond ( ) const
inline

Returns the velocity in micrometers per second.

Definition at line 43 of file velocity.h.

◆ inMilesPerHour()

float roo_quantity::Velocity::inMilesPerHour ( ) const
inline

Returns the velocity in miles per hour.

Definition at line 46 of file velocity.h.

Referenced by inMph().

◆ inMillimetersPerSecond()

float roo_quantity::Velocity::inMillimetersPerSecond ( ) const
inline

Returns the velocity in millimeters per second.

Definition at line 40 of file velocity.h.

◆ inMph()

float roo_quantity::Velocity::inMph ( ) const
inline

Returns the velocity in miles per hour.

Definition at line 49 of file velocity.h.

References inMilesPerHour().

◆ isUnknown()

bool roo_quantity::Velocity::isUnknown ( ) const
inline

Returns whether the object represents an unknown velocity.

Definition at line 54 of file velocity.h.

◆ operator!=()

bool roo_quantity::Velocity::operator!= ( const Velocity other) const
inline

Definition at line 76 of file velocity.h.

◆ operator*=()

Velocity & roo_quantity::Velocity::operator*= ( float  multi)
inline

Definition at line 90 of file velocity.h.

◆ operator+=()

Velocity & roo_quantity::Velocity::operator+= ( const Velocity other)
inline

Definition at line 80 of file velocity.h.

References inMetersPerSecond().

◆ operator-=()

Velocity & roo_quantity::Velocity::operator-= ( const Velocity other)
inline

Definition at line 85 of file velocity.h.

References inMetersPerSecond().

◆ operator/=()

Velocity & roo_quantity::Velocity::operator/= ( float  div)
inline

Definition at line 95 of file velocity.h.

◆ operator<()

bool roo_quantity::Velocity::operator< ( const Velocity other) const
inline

Definition at line 56 of file velocity.h.

◆ operator<=()

bool roo_quantity::Velocity::operator<= ( const Velocity other) const
inline

Definition at line 68 of file velocity.h.

◆ operator==()

bool roo_quantity::Velocity::operator== ( const Velocity other) const
inline

Definition at line 60 of file velocity.h.

◆ operator>()

bool roo_quantity::Velocity::operator> ( const Velocity other) const
inline

Definition at line 64 of file velocity.h.

◆ operator>=()

bool roo_quantity::Velocity::operator>= ( const Velocity other) const
inline

Definition at line 72 of file velocity.h.

Friends And Related Symbol Documentation

◆ UnknownVelocity

Velocity UnknownVelocity ( )
friend

Returns a velocity object representing an unknown velocity.

Definition at line 123 of file velocity.h.

◆ VelocityInMetersPerSecond

Velocity VelocityInMetersPerSecond ( float  velocity)
friend

Returns a velocity object equivalent to the specified velocity expressed in meters per second.

Definition at line 133 of file velocity.h.


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