I am in the process of creating a framework used for developing mostly simulation-type games (but, a general game framework is the ultimate goal). As a result, I am attempting to plan out several fundamental systems and subsystems (including Events/Messaging, Actions/Behaviors, Dialog/Quests...
I was already doing this. I was very tired. I could see what it was doing, but couldn't understand why. lol.
True, but so far, I've only started working on this one class as a sort of experiment. I'll probably make a repo for it later today.
I solved the recursion. It's as I said, the Clamp()...
Ok. I've isolated the recursion to the Pair(Bit[] bitArray) constructor and the Clamp(Pair P) method.
From what I can tell, when I attempt to declare a Fuzzy.Bit.Pair, it attempts to construct the static definitions for Pair.Zero, etc. These call the Pair(Bit[] bitArray) constructor, which then...
And this is the output I'm getting.
The last two calls repeat indefinitely, bouncing back and forth between lines 279 and 190
(Of my original code, I removed comments and things that weren't relevant from the above code).
StackOverflowException: The requested operation caused a stack...
Here are an example of my tests.
// These all still work fine
public Fuzzy.Bit A = 0.8m, B = 0.2m, C, D, E, F, G;
C = 3;
D = A + B;
E = A + 1;
F = B - A;
G = E - F;
// These used to work
public Fuzzy.Bit.Pair W, X, Y, Z;
W = new Fuzzy.Bit[] { A, B };
X = Fuzzy.Bit.Pair.Three;
Y = X + W;
Z =...
OK, I have this class that represents a "fuzzy bit", or the closed unit interval [0,1].
My intent is to eventually make a "fuzzy byte" class, but first I was trying to create just a "fuzzy pair" of "fuzzy bits", representing values the interval [0,3].
I would later create an abstract base class...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.