summaryrefslogtreecommitdiff
path: root/components/external/espruino/libs/jswrap_math.h
blob: b5dff095a59ddbdcc762ea4b76361139d29f4cd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * This file is part of Espruino, a JavaScript interpreter for Microcontrollers
 *
 * Copyright (C) 2013 Gordon Williams <[email protected]>
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * ----------------------------------------------------------------------------
 * Contains built-in functions for Maths
 * ----------------------------------------------------------------------------
 */
#include "jsutils.h"
#include "jsvar.h"

#ifdef ARM
#include "mconf.h"
#include "protos.h"
#else
#include <math.h>
#endif


JsVarInt jswrap_integer_valueOf(JsVar *v);
JsVarFloat jswrap_math_abs(JsVarFloat x);
double jswrap_math_pow(double x, double y);
JsVarFloat jswrap_math_clip(JsVarFloat x, JsVarFloat min, JsVarFloat max);