summaryrefslogtreecommitdiffstats
path: root/cc/util.h
blob: 6da3a697c4ac3396602903d7ac75d85fad4e7abd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CC_UTIL_H_
#define CC_UTIL_H_

namespace cc {

template<typename T> 
T RoundUp(T n, T mul)
{
    return ((n + mul - 1) / mul) * mul;
}

}  // namespace cc

#endif  // CC_UTIL_H_