Joseph Ellsworth / Mbed 2 deprecated xj-Nucleo-F303K8-hdc1080-test

Dependencies:   hdc1080 mbed

Fork of Nucleo-F303K8-SSD1306_OLED by Joseph Ellsworth

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mbed_helper.h Source File

mbed_helper.h

00001 /* mbed Microcontroller Library - Helper
00002  * Copyright (c) 2007-2008, sford
00003  */
00004  
00005 #ifndef MBED_HELPER_H
00006 #define MBED_HELPER_H
00007  
00008 /* Section: helper
00009  *  A collection of useful functions not found in the standard C libraries
00010  */
00011  
00012 namespace mbed {
00013  
00014 /* Function: min
00015  *  Return the minimum of two integers
00016  */
00017 int min(int a, int b);
00018  
00019 /* Function: min
00020  *  Return the minimum of two floating-point numbers
00021  */
00022 float min(float a, float b);
00023  
00024 /* Function: max
00025  *  Return the maximum of two integers
00026  */
00027 int max(int a, int b);
00028  
00029 /* Function: max
00030  *  Return the maximum of two floating-point numbers
00031  */
00032 float max(float a, float b);
00033  
00034 /* Function: clamp
00035  *  Return the value, clamped between a minimum and maximum integer value
00036  */
00037 int clamp(int value, int minimum, int maximum);
00038  
00039 /* Function: clamp
00040  *  Return the value, clamped between a minimum and maximum floating-point value
00041  */
00042 float clamp(float value, float minimum, float maximum);
00043  
00044 } // namespace mbed
00045  
00046 #endif