~ubuntu-branches/ubuntu/natty/spring/natty

« back to all changes in this revision

Viewing changes to AI/Skirmish/E323AI/MathUtil.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Ritchie
  • Date: 2010-09-23 18:56:03 UTC
  • mfrom: (3.1.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100923185603-st97s5chplo42y7w
Tags: 0.82.5.1+dfsg1-1ubuntu1
* Latest upstream version for online play
* debian/control: Replace (rather than conflict) spring-engine
  - spring-engine will be a dummy package (LP: #612905)
  - also set maintainer to MOTU

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "MathUtil.h"
2
 
 
3
 
#include "headers/Defines.h"
4
 
 
5
 
#include <math.h>
6
 
 
7
 
#if defined(_MSC_VER)
8
 
 
9
 
float round(float val)
10
 
{
11
 
#if defined(__cplusplus)
12
 
    return floor(val + 0.5f);
13
 
#else
14
 
        return floorf(val + 0.5f);
15
 
#endif
16
 
}
17
 
 
18
 
double round(double val)
19
 
{
20
 
        return floor(val + 0.5);
21
 
}
22
 
 
23
 
#endif
 
1
#include "MathUtil.h"
 
2
 
 
3
#include "headers/Defines.h"
 
4
 
 
5
#include <math.h>
 
6
 
 
7
#if defined(_MSC_VER)
 
8
 
 
9
float round(float val)
 
10
{
 
11
#if defined(__cplusplus)
 
12
    return floor(val + 0.5f);
 
13
#else
 
14
        return floorf(val + 0.5f);
 
15
#endif
 
16
}
 
17
 
 
18
double round(double val)
 
19
{
 
20
        return floor(val + 0.5);
 
21
}
 
22
 
 
23
#endif