Changeset 1513
- Timestamp:
- Jun 23, 2012, 12:46:39 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 35 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/neercs/neercs.cpp
r1490 r1513 63 63 caca_clear_canvas(m_caca); 64 64 65 caca_fill_ellipse(m_caca, 20+10 * cos(m_time * 1.f), 10+10 * sin(m_time * 1.f), 16+8 * sin(m_time * 6.f), 12+6 *cos(m_time * 5.f), '|');66 caca_fill_ellipse(m_caca, 20+10 * cos(m_time * 1.f), 10+10 * sin(m_time * 1.f), 12+8 * sin(m_time * 6.f), 8+6 *cos(m_time * 5.f), ' ');65 caca_fill_ellipse(m_caca, 20+10 * lol::cos(m_time * 1.f), 10+10 * lol::sin(m_time * 1.f), 16+8 * lol::sin(m_time * 6.f), 12+6 * lol::cos(m_time * 5.f), '|'); 66 caca_fill_ellipse(m_caca, 20+10 * lol::cos(m_time * 1.f), 10+10 * lol::sin(m_time * 1.f), 12+8 * lol::sin(m_time * 6.f), 8+6 * lol::cos(m_time * 5.f), ' '); 67 67 68 68 caca_set_color_ansi(m_caca, 2, CACA_DEFAULT); 69 int x1 = 12 + 10 * cos(m_time * 5.f);70 int y1 = 6 + 5 * sin(m_time * 5.f);71 int x2 = 30 + 5 * cos(m_time * 8.f);72 int y2 = 8 + 5 * sin(m_time * 8.f);73 int y3 = 8 + 5 * cos(m_time * 5.f);69 int x1 = 12 + 10 * lol::cos(m_time * 5.f); 70 int y1 = 6 + 5 * lol::sin(m_time * 5.f); 71 int x2 = 30 + 5 * lol::cos(m_time * 8.f); 72 int y2 = 8 + 5 * lol::sin(m_time * 8.f); 73 int y3 = 8 + 5 * lol::cos(m_time * 5.f); 74 74 caca_draw_thin_line(m_caca, x1, y1, x2, y2); 75 75 caca_draw_thin_line(m_caca, 40, y3, x2, y2); 76 76 caca_draw_thin_line(m_caca, x1, y1, 40, y3); 77 77 78 int x3 = 13 + 7 * cos(m_time * 3.f);78 int x3 = 13 + 7 * lol::cos(m_time * 3.f); 79 79 caca_set_color_ansi(m_caca, CACA_CYAN, CACA_BLUE); 80 80 caca_put_str(m_caca, x3, 3, " LOL WUT "); 81 81 82 int x4 = 6 + 5 * cos(m_time * 2.f);82 int x4 = 6 + 5 * lol::cos(m_time * 2.f); 83 83 caca_set_color_ansi(m_caca, CACA_YELLOW, CACA_RED); 84 84 caca_put_str(m_caca, x4, 25, "Le Caca C'Est Surpuissant \\:D/"); -
trunk/src/Makefile.am
r1512 r1513 15 15 lol/unit.h lol/debug.h \ 16 16 lol/math/vector.h lol/math/half.h lol/math/real.h lol/math/remez.h \ 17 lol/math/ trig.h \17 lol/math/math.h \ 18 18 \ 19 19 generated/location.hh generated/position.hh generated/stack.hh \ -
trunk/src/audio.cpp
r950 r1513 12 12 # include "config.h" 13 13 #endif 14 15 #include <cmath>16 14 17 15 #if defined USE_SDL_MIXER -
trunk/src/core.h
r1512 r1513 69 69 // Base types 70 70 #include "lol/debug.h" 71 #include "lol/math/math.h" 71 72 #include "lol/math/half.h" 72 73 #include "lol/math/real.h" 73 74 #include "lol/math/vector.h" 74 #include "lol/math/trig.h"75 75 #include "numeric.h" 76 76 #include "timer.h" -
trunk/src/debug/quad.cpp
r1310 r1513 21 21 #endif 22 22 23 #include <cmath>24 23 #include <cstdio> 25 24 #include <cstring> -
trunk/src/debug/sphere.cpp
r1310 r1513 20 20 # include <windows.h> 21 21 #endif 22 23 #include <cmath>24 22 25 23 #include "core.h" -
trunk/src/emitter.cpp
r1310 r1513 12 12 # include "config.h" 13 13 #endif 14 15 #include <cmath>16 14 17 15 #include "core.h" -
trunk/src/gpu/shader.cpp
r1470 r1513 13 13 #endif 14 14 15 #include <cmath>16 15 #include <cstring> 17 16 #include <cstdio> -
trunk/src/gradient.cpp
r1337 r1513 12 12 # include "config.h" 13 13 #endif 14 15 #include <cmath>16 14 17 15 #include "core.h" -
trunk/src/image/codec/android-image.cpp
r963 r1513 14 14 15 15 #if defined __ANDROID__ 16 17 #include <cmath>18 16 19 17 #include <jni.h> -
trunk/src/image/codec/dummy-image.cpp
r1046 r1513 12 12 # include "config.h" 13 13 #endif 14 15 #include <cmath>16 14 17 15 #include "core.h" -
trunk/src/image/codec/gdiplus-image.cpp
r1408 r1513 14 14 15 15 #if defined USE_GDIPLUS 16 17 #include <cmath>18 16 19 17 #include <algorithm> -
trunk/src/image/codec/ios-image.cpp
r962 r1513 15 15 #if defined __APPLE__ && defined __MACH__ && defined __arm__ 16 16 17 #include <cmath>18 17 #import <UIKit/UIKit.h> 19 18 -
trunk/src/image/codec/ps3-image.cpp
r1057 r1513 14 14 15 15 #if defined __CELLOS_LV2__ 16 17 #include <cmath>18 16 19 17 #include <cell/sysmodule.h> -
trunk/src/image/codec/sdl-image.cpp
r1183 r1513 14 14 15 15 #if defined USE_SDL_IMAGE 16 17 #include <cmath>18 16 19 17 #include <SDL.h> -
trunk/src/image/image.cpp
r1162 r1513 12 12 # include "config.h" 13 13 #endif 14 15 #include <cmath>16 14 17 15 #include "core.h" -
trunk/src/input/input.cpp
r1342 r1513 14 14 15 15 #include <cstdlib> 16 #include <cmath>17 16 18 17 #if defined USE_SDL -
trunk/src/input/stick.cpp
r1355 r1513 14 14 15 15 #include <cstdlib> 16 #include <cmath>17 16 18 17 #include "core.h" -
trunk/src/log.cpp
r939 r1513 13 13 #endif 14 14 15 #include <cmath>16 15 #include <cstdio> 17 16 -
trunk/src/lol/math/math.h
r1512 r1513 10 10 11 11 // 12 // Trigonometryfunctions13 // ---------------------- 12 // Various maths functions 13 // ----------------------- 14 14 // 15 15 16 #if !defined __LOL_MATH_ TRIG_H__17 #define __LOL_MATH_ TRIG_H__16 #if !defined __LOL_MATH_MATH_H__ 17 #define __LOL_MATH_MATH_H__ 18 18 19 #include <cmath> 19 20 #include <cstdio> 20 21 #include <stdint.h> … … 24 25 25 26 /* Standard cmath functions */ 27 static inline double sqrt(double const &x) { return std::sqrt(x); } 28 static inline float sqrt(float const &x) { return std::sqrt(x); } 29 26 30 static inline double sin(double const &x) { return std::sin(x); } 27 31 static inline double cos(double const &x) { return std::cos(x); } 28 32 static inline double tan(double const &x) { return std::tan(x); } 33 static inline float sin(float const &x) { return std::sin(x); } 34 static inline float cos(float const &x) { return std::cos(x); } 35 static inline float tan(float const &x) { return std::tan(x); } 36 29 37 static inline double asin(double const &x) { return std::asin(x); } 30 38 static inline double acos(double const &x) { return std::acos(x); } 31 39 static inline double atan(double const &x) { return std::atan(x); } 32 33 static inline float sin(float const &x) { return std::sin(x); }34 static inline float cos(float const &x) { return std::cos(x); }35 static inline float tan(float const &x) { return std::tan(x); }36 40 static inline float asin(float const &x) { return std::asin(x); } 37 41 static inline float acos(float const &x) { return std::acos(x); } … … 74 78 } /* namespace lol */ 75 79 76 #endif // __LOL_MATH_ TRIG_H__80 #endif // __LOL_MATH_MATH_H__ 77 81 -
trunk/src/lol/math/vector.h
r1426 r1513 18 18 19 19 #include <stdint.h> 20 #include <cmath>21 20 #include <ostream> 22 21 #include <algorithm> 23 22 23 #include "lol/math/math.h" 24 24 #include "lol/math/half.h" 25 25 #include "lol/math/real.h" … … 1199 1199 inline double length(tname<type> const &a) \ 1200 1200 { \ 1201 using std::sqrt; \1202 1201 return sqrt((double)sqlength(a)); \ 1203 1202 } \ -
trunk/src/lol/unit.h
r1163 r1513 21 21 #include <sstream> 22 22 #include <cstdio> 23 #include <cmath>24 23 25 24 namespace lol -
trunk/src/map.cpp
r1198 r1513 16 16 #include <cstring> 17 17 #include <cstdlib> 18 #include <cmath>19 18 #include <ctype.h> 20 19 -
trunk/src/math/real.cpp
r1311 r1513 30 30 #include <cstdio> 31 31 #include <cstdlib> 32 #include <cmath>33 32 34 33 #include "core.h" -
trunk/src/math/trig.cpp
r1180 r1513 16 16 # include <fastmath.h> 17 17 #endif 18 19 #include <cmath>20 18 21 19 #include "core.h" -
trunk/src/math/vector.cpp
r1512 r1513 26 26 #endif 27 27 28 #include <cmath> /* for M_PI */29 28 #include <cstdlib> /* free() */ 30 29 #include <cstring> /* strdup() */ -
trunk/src/numeric.h
r761 r1513 17 17 #define __LOL_NUMERIC_H__ 18 18 19 #include <cmath>20 19 #include <cstdlib> 21 20 #include <stdint.h> -
trunk/src/platform.cpp
r939 r1513 12 12 # include "config.h" 13 13 #endif 14 15 #include <cmath>16 14 17 15 #include "core.h" -
trunk/src/sample.cpp
r1310 r1513 15 15 #include <cstdlib> 16 16 #include <cstdio> 17 #include <cmath>18 17 #include <cstring> 19 18 -
trunk/src/scene.cpp
r1329 r1513 14 14 15 15 #include <cstdlib> 16 #include <cmath>17 16 18 17 #ifdef WIN32 -
trunk/src/tileset.cpp
r1337 r1513 15 15 #include <cstdlib> 16 16 #include <cstdio> 17 #include <cmath>18 17 #include <cstring> 19 18 -
trunk/src/video.cpp
r1325 r1513 12 12 # include "config.h" 13 13 #endif 14 15 #include <cmath>16 14 17 15 #if defined _XBOX -
trunk/test/tutorial/03_fractal.cpp
r1512 r1513 14 14 15 15 #include <cstring> 16 #include <cmath>17 16 18 17 #include "core.h" … … 117 116 double f = (double)i / PALETTE_STEP; 118 117 119 double r = 0.5 * sin(f * 0.27 + 2.0) + 0.5;120 double g = 0.5 * sin(f * 0.17 - 1.8) + 0.5;121 double b = 0.5 * sin(f * 0.21 - 2.6) + 0.5;118 double r = 0.5 * lol::sin(f * 0.27 + 2.0) + 0.5; 119 double g = 0.5 * lol::sin(f * 0.17 - 1.8) + 0.5; 120 double b = 0.5 * lol::sin(f * 0.21 - 2.6) + 0.5; 122 121 123 122 if (f < 7.0) -
trunk/test/xolotl/xolotl.cpp
r1512 r1513 38 38 float x = (i - 1000.0) / 100.0; 39 39 graph[i].x = x; 40 graph[i].y = sin(x * 10.0) / (1.0 + x * x);40 graph[i].y = lol::sin(x * 10.0) / (1.0 + x * x); 41 41 } 42 42 } -
trunk/win32/lolcore.vcxproj
r1512 r1513 173 173 <ClInclude Include="..\src\lol\debug.h" /> 174 174 <ClInclude Include="..\src\lol\math\half.h" /> 175 <ClInclude Include="..\src\lol\math\math.h" /> 175 176 <ClInclude Include="..\src\lol\math\real.h" /> 176 177 <ClInclude Include="..\src\lol\math\remez.h" /> 177 <ClInclude Include="..\src\lol\math\trig.h" />178 178 <ClInclude Include="..\src\lol\math\vector.h" /> 179 179 <ClInclude Include="..\src\lol\unit.h" /> -
trunk/win32/lolcore.vcxproj.filters
r1512 r1513 265 265 <Filter>src\lol\math</Filter> 266 266 </ClInclude> 267 <ClInclude Include="..\src\lol\math\math.h"> 268 <Filter>src\lol\math</Filter> 269 </ClInclude> 267 270 <ClInclude Include="..\src\lol\math\real.h"> 268 271 <Filter>src\lol\math</Filter> 269 272 </ClInclude> 270 273 <ClInclude Include="..\src\lol\math\remez.h"> 271 <Filter>src\lol\math</Filter>272 </ClInclude>273 <ClInclude Include="..\src\lol\math\trig.h">274 274 <Filter>src\lol\math</Filter> 275 275 </ClInclude>
Note: See TracChangeset
for help on using the changeset viewer.