~ubuntu-branches/ubuntu/saucy/geary/saucy-updates

« back to all changes in this revision

Viewing changes to src/engine/util/util-numeric.vala

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-03-14 13:48:23 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20130314134823-gyk5av1g508zyj8a
Tags: 0.3.0~pr1-0ubuntu1
New upstream version (FFE lp: #1154316), supports multiple account as
well as full conversation views with inline replies

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright 2012 Yorba Foundation
 
1
/* Copyright 2013 Yorba Foundation
2
2
 *
3
3
 * This software is licensed under the GNU Lesser General Public License
4
4
 * (version 2.1 or later).  See the COPYING file in this distribution. 
22
22
    return (value <= ceiling) ? value : ceiling;
23
23
}
24
24
 
 
25
public inline uint uint_ceiling(uint value, uint ceiling) {
 
26
    return (value <= ceiling) ? value : ceiling;
 
27
}
 
28
 
25
29
public inline bool int_in_range_inclusive(int value, int min, int max) {
26
30
    return (value >= min) && (value <= max);
27
31
}
38
42
    return (value > min) && (value < max);
39
43
}
40
44
 
 
45
public inline int int_round_up(int value, int multiple_of) {
 
46
    return ((value / multiple_of) * multiple_of) + ((value % multiple_of != 0) ? multiple_of : 0);
 
47
}
 
48
 
41
49
}
42
50