source:
CIVL/mods/dev.civl.com/examples/library/math/floor.c@
bc0fbae
| Last change on this file since bc0fbae was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 188 bytes | |
| Line | |
|---|---|
| 1 | #include <math.h> |
| 2 | #include <assert.h> |
| 3 | |
| 4 | int main() { |
| 5 | double pi = 3.14; |
| 6 | float pif = 3.14f; |
| 7 | double f = floor(pi); |
| 8 | |
| 9 | assert(f == 3); |
| 10 | |
| 11 | f = floorf(pif); |
| 12 | assert(f == 3); |
| 13 | return 0; |
| 14 | } |
Note:
See TracBrowser
for help on using the repository browser.
