01-31-2004, 07:24 PM
Hey,
can anyone tell me how to square root stuff inside a text box,cant seem to find out.
can anyone tell me how to square root stuff inside a text box,cant seem to find out.
square rooting in VB
|
01-31-2004, 07:24 PM
Hey,
can anyone tell me how to square root stuff inside a text box,cant seem to find out.
01-31-2004, 07:46 PM
it's basicly this
Code: Text1.Text = Sqr(Text1.Text)
01-31-2004, 11:37 PM
not quite. i tried that and it didn't work for me. use this formula.
Code: Num = val(text1.text)
the mind is a beautiful thing, use it and make the world a more beautiful place.
02-01-2004, 12:23 AM
Quote:it's basicly thisyou just gotta do this: Code: Text1.Text = Str(SQR(Val(Text1.Text)))
B 4 EVER
02-01-2004, 01:20 AM
it worked on mine without turning it into a string and back
02-01-2004, 05:39 AM
Quote:...use this formula.Mech, that's brilliant! I never thought you could raise a number to .5 to get the square root. I wrote a little program to test it. Who said you can't teach an old dog new tricks. Thanks! *****
02-01-2004, 07:49 AM
Well, that's just math. The Nth root of a number is that number powered to the 1/Nth power.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio underBASIC, homegrown musicians [img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
02-01-2004, 07:39 PM
*Zack runs in to give his useless two cents*
-(n^-1) is the negative reciprocal of a number. Whatever. :roll:
f only life let you press CTRL-Z.
-------------------------------------- Freebasic is like QB, except it doesn't suck.
02-02-2004, 10:22 AM
Quote:it worked on mine without turning it into a string and back VB has a "VARIANT" default. :*)
02-02-2004, 03:01 PM
Quote:Well, that's just math. The Nth root of a number is that number powered to the 1/Nth power. To be exactly.... nSQR is the n-th root of a number. Code: nSQR(x ^ p) = x ^ (p/n) |
« Next Oldest | Next Newest »
|