I have another revision of the rainbow script. It 's a String prototype function that creates DOM nodes (a containing span that contains one span per letter in the string). The reason for the containing span is so that another function can be called. This second function "moves" the rainbow by recoloring it with a different starting hue value.

I'm sure it's less efficient than some of the other rainbow stuff we've made, but it moves! Ooh!

06-18-2005, 04:00 AM

BigMoosie

Thats pretty awesome Hagane, though I dont see the purpose of making it a prototype function.

06-18-2005, 11:18 AM

HaganeNoKokoro

So I could post it in this thread :D

06-19-2005, 01:40 AM

Ultimater

Quote:

Originally Posted by HaganeNoKokoro

So I could post it in this thread :D

LOL,
I knew this was gonna happen sooner or later...
That RainbowSpan function is a nice function and deserves a proper place. With all due respect, post it here: Function Library
I'd add your RainbowSpan function to my index page, but it isn't a prototype function.
You guys have been watching my first post of this thread, right?

06-19-2005, 04:16 AM

HaganeNoKokoro

Yeah, I know it isn't really a prototype-function, I just figured I could get a rise out of you with that comment. I'll post the latest version in your other thread.

06-19-2005, 04:21 AM

BigMoosie

Does anybody have a function that would turn:

3.3333333333

into

[10,3]

as in 10/3, and the same for any other rational?

06-19-2005, 04:28 AM

Ultimater

Thanks for the addition to my other thread, HaganeNoKokoro, that function really is an accomplishment -- I see many uses for it.

BigMoosie, I'm sure I can come up with something -- my TI-86 calc has a ►Frac function.

06-19-2005, 04:57 AM

Ultimater

3.3333333333 Can be written as: 33333333333 / 1000000000
The only problem is that you need to make JavaScript understand that 3.3333333333 means 3.33... repeating.
Thus 33333333333 / 1000000000 means 10/3
Hmm....
I'll have a clear head tomorrow...

06-19-2005, 05:41 AM

HaganeNoKokoro

It would be easier if you mark up the number to indicate repetition, something like: "3.[3]" where the part in brackets is the repeating part.

In general:
you have a string: a.b[c]
where a, b, and c all consist only of digits 0-9