⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basic.h

📁 卡耐基.梅隆大学的机器人仿真软件(Redhat linux 9下安装)
💻 H
字号:
// // This Program is provided by Duke University and the authors as a service to the// research community. It is provided without cost or restrictions, except for the// User's acknowledgement that the Program is provided on an "As Is" basis and User// understands that Duke University and the authors make no express or implied// warranty of any kind.  Duke University and the authors specifically disclaim any// implied warranty or merchantability or fitness for a particular purpose, and make// no representations or warranties that the Program will not infringe the// intellectual property rights of others. The User agrees to indemnify and hold// harmless Duke University and the authors from and against any and all liability// arising out of User's use of the Program.//// basic.h//// Copyright 2005, Austin Eliazar, Ronald Parr, Duke University//// basic stuff used by everybody //// These includes pull in interface definitions and utilities.#include <stdlib.h>#include <math.h>#include <stdio.h>// This defines the number of grid squares per meter. // All sensors are assumed to be measuring in meters, whereas all code uses a basic unit of grid squares. // We use this constant for conversion.#define MAP_SCALE 20// Some useful macros#define SIGN(A) ((A) >= 0.0 ? (1.0) : (-1.0))#define SQUARE(A) (((A) * (A)))#define MAX(A,B) ((A) >= (B) ? (A) : (B))#define MIN(A,B) ((A) >= (B) ? (B) : (A))// An approximation of a normal distribution, where A is the standard deviation#define GAUSSIAN(A) ((MTrandDec()+MTrandDec()+MTrandDec()+MTrandDec()+MTrandDec()+MTrandDec()-3)*(A)/.7071)#define FALSE 0#define TRUE 1// When recording a log file, the file name of the log is stored in *RECORDING// When playing back a log file, the name is stored in *PLAYBACKextern char *PLAYBACK, *RECORDING;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -