include/ruby/backward/2/r_cast.h: deprecate
[ruby.git] / internal / complex.h
blob6f63a9ebeb7de36108c1a327b427371842a115cc
1 #ifndef INTERNAL_COMPLEX_H /*-*-C-*-vi:se ft=c:*/
2 #define INTERNAL_COMPLEX_H
3 /**
4 * @file
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 */
14 struct RComplex {
15 struct RBasic basic;
16 VALUE real;
17 VALUE imag;
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))
26 /* complex.c */
27 VALUE rb_dbl_complex_new_polar_pi(double abs, double ang);
29 #endif /* INTERNAL_COMPLEX_H */