1 /*
2     Copyright (C) 2008, 2009 William Hart
3     Copyright (C) 2010 Sebastian Pancratz
4     Copyright (C) 2012 Andres Goens
5     Copyright (C) 2013 Mike Hansen
6 
7     This file is part of FLINT.
8 
9     FLINT is free software: you can redistribute it and/or modify it under
10     the terms of the GNU Lesser General Public License (LGPL) as published
11     by the Free Software Foundation; either version 2.1 of the License, or
12     (at your option) any later version.  See <http://www.gnu.org/licenses/>.
13 */
14 
15 #ifdef T
16 
17 #include "templates.h"
18 
19 void
TEMPLATE(T,poly_get_coeff)20 TEMPLATE(T, poly_get_coeff) (TEMPLATE(T, t) x, const TEMPLATE(T, poly_t) poly,
21                              slong n, const TEMPLATE(T, ctx_t) ctx)
22 {
23     if (n < poly->length)
24         TEMPLATE(T, set) (x, poly->coeffs + n, ctx);
25     else
26         TEMPLATE(T, zero) (x, ctx);
27 }
28 
29 
30 #endif
31