File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# TODO
22
3- - get object rotation: 3 Euler angles. Attempt made at ` gravity.cpp `
4- - get object velocity and angular velocity
5- - what is the point of motion state?
6- - Stairs physics: http://gamedev.stackexchange.com/questions/74794/make-the-player-run-onto-stairs-smoothly
7- - Voronoi: https://www.youtube.com/watch?v=FIPu9_OGFgc
8- - substeps vs smaller time step on stepSimulation?
9- - opengl visualization
10- - user input
3+ - get object rotation: 3 Euler angles. Attempt made at ` gravity.cpp `
4+ - get object velocity and angular velocity
5+ - what is the point of motion state?
6+ - Stairs physics: http://gamedev.stackexchange.com/questions/74794/make-the-player-run-onto-stairs-smoothly
7+ - Voronoi: https://www.youtube.com/watch?v=FIPu9_OGFgc
8+ - substeps vs smaller time step on stepSimulation?
9+ - opengl visualization
10+ - user input
11+ - 2D
12+ - http://gamedev.stackexchange.com/questions/22319/how-to-disable-y-axis-movement-in-the-bullet-physics-engine
13+ - http://gamedev.stackexchange.com/questions/6130/is-it-worth-it-to-use-bullet-for-2d-physics-instead-of-box2d-for-the-sake-of-lea
Original file line number Diff line number Diff line change 11# glibc
22
331 . [ Introduction] ( introduction.md )
4- 1 . Usage
4+ 1 . Examples
5+ 1 . [ alloca.c] ( alloca.c )
6+ 1 . [ brk.c] ( brk.c )
57 1 . [ main.c] ( main.c )
8+ 1 . [ ptrace.c] ( ptrace.c )
9+ 1 . [ reboot.c] ( reboot.c.off )
610 1 . [ syscall.c] ( syscall.c )
7- 1 . [ alloca.c] ( alloca.c )
11+ 1 . ` string.h `
12+ 1 . [ strverscmp.c] ( strverscmp.c )
13+ 1 . TODO
14+ 1 . [ sendfile.c] ( sendfile.c.off )
8151 . Internals
916 1 . [ Makefile] ( makefile.md )
1017 1 . [ Source tree] ( source-tree.md )
Original file line number Diff line number Diff line change 1+ /*
2+ http://stackoverflow.com/questions/15057010/comparing-version-numbers-in-c/37015135#37015135
3+ */
4+
5+ #define _GNU_SOURCE
6+ #include <assert.h>
7+ #include <stdlib.h>
8+ #include <string.h>
9+
10+ int main (void ) {
11+ assert (strverscmp ("1.2.3" , "1.2.3" ) == 0 );
12+ assert (strverscmp ("1.2.3" , "1.2.4" ) < 0 );
13+ assert (strverscmp ("1.2.3" , "1.2.2" ) > 0 );
14+ assert (strverscmp ("9.2.3" , "10.2.3" ) < 0 );
15+ assert (strverscmp ("10.2.3" , "9.2.3" ) > 0 );
16+
17+ /* Delimiers are also compared. */
18+ assert (strverscmp ("1a2" , "1b2" ) < 0 );
19+ assert (strverscmp ("1b2" , "1a2" ) > 0 );
20+
21+ /* Leading 0s: number gets treated as 0.X, e.g. 01 means 0.1.
22+ * Maybe not perfect for version strings, but sane version strings
23+ * should not have trailing 0s.
24+ */
25+ assert (strverscmp ("01" , "9" ) < 0 );
26+ assert (strverscmp ("01" , "09" ) < 0 );
27+ assert (strverscmp ("01" , "09" ) < 0 );
28+ assert (strverscmp ("09" , "1" ) < 0 );
29+ return EXIT_SUCCESS ;
30+ }
You can’t perform that action at this time.
0 commit comments