From b2f2fd990f9059db784a7849726c6fc5006c70f9 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Mon, 27 Dec 2004 14:44:11 +0000 Subject: a lot of new objects ... svn path=/trunk/externals/tb/; revision=2431 --- chaos/src/bernoulli_map.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'chaos/src/bernoulli_map.hpp') diff --git a/chaos/src/bernoulli_map.hpp b/chaos/src/bernoulli_map.hpp index 50bca13..25d19f8 100644 --- a/chaos/src/bernoulli_map.hpp +++ b/chaos/src/bernoulli_map.hpp @@ -25,17 +25,17 @@ // taken from Willi-Hans Steeb: Chaos and Fractals class bernoulli: - protected map_base + public map_base { public: bernoulli() { - m_num_eq = 1: + m_num_eq = 1; m_data = new data_t[1]; - CHAOS_SYS_INIT(x,0.5) + CHAOS_SYS_INIT(x,0.5); } - ~Bernoulli() + ~bernoulli() { delete m_data; } @@ -43,6 +43,9 @@ public: virtual void m_step() { data_t x = m_data[0]; + + if (x <= 0) + x = 0.00001; //stability if (x < 0.5f) m_data[0] = 2.f * x; -- cgit v1.2.1