From c5a5eff4b65bb611155b229f1320a8c358f5eb8b Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Thu, 13 May 1999 10:01:09 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'v1_3_3_990513'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_3_3_990513@467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/mandel/mandel.c | 59 ----------------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 ext/mandel/mandel.c (limited to 'ext/mandel/mandel.c') diff --git a/ext/mandel/mandel.c b/ext/mandel/mandel.c deleted file mode 100644 index 359c0756da..0000000000 --- a/ext/mandel/mandel.c +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************ - - mandel.c - - - $Author$ - -************************************************/ - -#include "ruby.h" -#include "math.h" - -static VALUE -mandel(self, re, im, max) - VALUE self; - VALUE re; - VALUE im; - VALUE max; -{ - double real, image; - double z_real, z_image; - double tmp_real; - int maximum; - int i; - - Check_Type(re, T_FLOAT); - Check_Type(im, T_FLOAT); - Check_Type(max, T_FIXNUM); - - real = RFLOAT(re)->value; - image = RFLOAT(im)->value; - maximum = FIX2INT(max); - - /*** - z = c = Complex(re, im) - for i in 0 .. $max_deapth - z = (z * z) + c - break if z.abs > 2 - end - return i - ***/ - - z_real = real; - z_image = image; - for (i = 0; i < maximum; i++) { - tmp_real = ((z_real * z_real) - (z_image * z_image)) + real; - z_image = ((z_real * z_image) + (z_image * z_real)) + image; - z_real = tmp_real; - if ( ((z_real * z_real) + (z_image * z_image)) > 4.0 ) { - break; - } - } - return INT2FIX(i); -} - -Init_mandel() -{ - VALUE mMandel = rb_define_module("Mandel"); - rb_define_module_function(mMandel, "mandel", mandel, 3); -} -- cgit v1.2.3