1 #ifndef INTERNAL_COMPLEX_H /*-*-C-*-vi:se ft=c:*/
2 #define INTERNAL_COMPLEX_H
5 * @author Ruby developers <ruby-core@ruby-lang.org>
6 * @copyright This file is a part of the programming language Ruby.
7 * Permission is hereby granted, to either redistribute and/or
8 * modify this file, provided that the conditions mentioned in the
9 * file COPYING are met. Consult the file for details.
10 * @brief Internal header for Complex.
12 #include "ruby/internal/value.h" /* for struct RBasic */
20 #define RCOMPLEX(obj) ((struct RComplex *)(obj))
22 /* shortcut macro for internal only */
23 #define RCOMPLEX_SET_REAL(cmp, r) RB_OBJ_WRITE((cmp), &RCOMPLEX(cmp)->real, (r))
24 #define RCOMPLEX_SET_IMAG(cmp, i) RB_OBJ_WRITE((cmp), &RCOMPLEX(cmp)->imag, (i))
27 VALUE
rb_dbl_complex_new_polar_pi(double abs
, double ang
);
29 #endif /* INTERNAL_COMPLEX_H */