2 * Copyright (C) 2017 EfficiOS Inc., Alexandre Montplaisir <alexmonthy@efficios.com>
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 package org
.lttng
.scope
.tmf2
.views
.core
;
13 * Uncommon math utility methods.
15 * @author Alexandre Montplaisir
17 public final class MathUtils
{
19 private MathUtils() {}
22 * Find the multiple of 'multipleOf' that is greater but closest to
23 * 'number'. If 'number' is already a multiple of 'multipleOf', the same
24 * value will be returned.
29 * We want the returned value to be a multiple of this number
30 * @return The closest, greater multiple
32 public static long roundToClosestHigherMultiple(long number
, long multipleOf
) {
33 return (long) (Math
.ceil((double) number
/ multipleOf
) * multipleOf
);
This page took 0.03063 seconds and 5 git commands to generate.