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

Representation of force, internally stored as floating-point Newtons. More...

#include <force.h>

Public Member Functions

 Force ()
 Creates a force object representing an 'unknown' force.
 
float inKiloNewtons () const
 Returns the force in kiloNewtons.
 
float inNewtons () const
 Returns the force in Newtons.
 
float inMilliNewtons () const
 Returns the force in milliNewtons.
 
float inMicroNewtons () const
 Returns the force in microNewtons.
 
bool isUnknown () const
 Returns whether the object represents an unknown force.
 
bool operator< (const Force &other) const
 
bool operator== (const Force &other) const
 
bool operator> (const Force &other) const
 
bool operator<= (const Force &other) const
 
bool operator>= (const Force &other) const
 
bool operator!= (const Force &other) const
 
Forceoperator+= (const Force &other)
 
Forceoperator-= (const Force &other)
 
Forceoperator*= (float multi)
 
Forceoperator/= (float div)
 

Friends

Force UnknownForce ()
 Returns a force object representing an unknown force.
 
Force ForceInNewtons (float)
 Returns a force object equivalent to the specified force expressed in Newtons.
 

Detailed Description

Representation of force, internally stored as floating-point Newtons.

Definition at line 22 of file force.h.

Constructor & Destructor Documentation

◆ Force()

roo_quantity::Force::Force ( )
inline

Creates a force object representing an 'unknown' force.

Definition at line 25 of file force.h.

Member Function Documentation

◆ inKiloNewtons()

float roo_quantity::Force::inKiloNewtons ( ) const
inline

Returns the force in kiloNewtons.

Definition at line 28 of file force.h.

◆ inMicroNewtons()

float roo_quantity::Force::inMicroNewtons ( ) const
inline

Returns the force in microNewtons.

Definition at line 37 of file force.h.

◆ inMilliNewtons()

float roo_quantity::Force::inMilliNewtons ( ) const
inline

Returns the force in milliNewtons.

Definition at line 34 of file force.h.

◆ inNewtons()

◆ isUnknown()

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

Returns whether the object represents an unknown force.

Definition at line 40 of file force.h.

◆ operator!=()

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

Definition at line 52 of file force.h.

◆ operator*=()

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

Definition at line 66 of file force.h.

◆ operator+=()

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

Definition at line 56 of file force.h.

References inNewtons().

◆ operator-=()

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

Definition at line 61 of file force.h.

References inNewtons().

◆ operator/=()

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

Definition at line 71 of file force.h.

◆ operator<()

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

Definition at line 42 of file force.h.

◆ operator<=()

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

Definition at line 48 of file force.h.

◆ operator==()

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

Definition at line 44 of file force.h.

◆ operator>()

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

Definition at line 46 of file force.h.

◆ operator>=()

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

Definition at line 50 of file force.h.

Friends And Related Symbol Documentation

◆ ForceInNewtons

Force ForceInNewtons ( float  force)
friend

Returns a force object equivalent to the specified force expressed in Newtons.

Definition at line 121 of file force.h.

◆ UnknownForce

Force UnknownForce ( )
friend

Returns a force object representing an unknown force.

Definition at line 99 of file force.h.


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