X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2F2geom%2Futils.h;h=5ab19174947a886f0f93776f503c137d8e9e0a8e;hb=698cd69991e23d81f6dccf30b2014d8cf0981d11;hp=2be995248b57db8c48d8110befcbe8d20cff430b;hpb=ed0798e33e14e86b60f8cd254d7131f9d83ba8c0;p=inkscape.git diff --git a/src/2geom/utils.h b/src/2geom/utils.h index 2be995248..5ab191749 100644 --- a/src/2geom/utils.h +++ b/src/2geom/utils.h @@ -1,8 +1,11 @@ -#ifndef UTILS_HEADER -#define UTILS_HEADER +#ifndef LIB2GEOM_UTILS_HEADER +#define LIB2GEOM_UTILS_HEADER -/** Various utility functions. +/** + * \file + * \brief Various utility functions. * + * Copyright 2007 Johan Engelen * Copyright 2006 Michael G. Sloan * * This library is free software; you can redistribute it and/or @@ -31,12 +34,9 @@ */ #include -#include +#include -class NotImplemented : public std::logic_error { -public: - NotImplemented() : std::logic_error("method not implemented") {} -}; +namespace Geom { // proper logical xor inline bool logical_xor (bool a, bool b) { return (a || b) && !(a && b); } @@ -79,4 +79,20 @@ inline double decimal_round(double const x, int const places) { return round( x * multiplier ) / multiplier; } + +void binomial_coefficients(std::vector& bc, size_t n); + +} + #endif + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :