Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Nucleo-F303K8-SSD1306_OLED by
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
Generated on Mon Jul 18 2022 05:07:44 by
1.7.2
