philonline
11-10-2003, 07:18 PM
I'm trying to calculate the Cubic root of an operation... wich syntax should I use?
:confused:
Thanx
Phil
:confused:
Thanx
Phil
|
Click to See Complete Forum and Search --> : Cubic root philonline 11-10-2003, 07:18 PM I'm trying to calculate the Cubic root of an operation... wich syntax should I use? :confused: Thanx Phil 96turnerri 11-10-2003, 08:31 PM cbrt should do the trick :D pyro 11-10-2003, 09:23 PM What is cbrt? :confused: 96turnerri 11-11-2003, 05:51 AM its the multiplier instead of a simple calculation say 1 x 2, or 3 + 5, do 2 cbrt 8 Charles 11-11-2003, 06:02 AM <script type="text/javascript"> <!-- Math.cbrt = function (n) {return Math.pow(n, 1/3)} alert (Math.cbrt(27)) // --> </script> pyro 11-11-2003, 07:29 AM Originally posted by 96turnerri its the multiplier instead of a simple calculation say 1 x 2, or 3 + 5, do 2 cbrt 8 There isn't, however, any default function called cbrt to get the cubic root. Charles solution is what you want. 96turnerri 11-11-2003, 09:22 AM i presumed he already had the script just wanted the command/function to get cubic root and that is cbrt, not doing all the work for him :p pyro 11-11-2003, 10:35 AM Since one would have to make the function before the use it, they could name it whatever they want. Wouldn't have to name it cbrt. 96turnerri 11-11-2003, 11:32 AM ok do a search on google for javascript cubic root code, all of the results give cbrt not cubicroot or anything else pyro 11-11-2003, 11:36 AM My point is that there is no function to do this. Who cares what people name the functions that they create? It is not important... Telling them:Originally posted by 96turnerri cbrt should do the trick :D really doesn't help much... 96turnerri 11-11-2003, 11:38 AM ok whatevr m8, im tired and going to bed, site looks good btw philonline 11-13-2003, 02:06 PM Originally posted by 96turnerri i presumed he already had the script just wanted the command/function to get cubic root and that is cbrt, not doing all the work for him :p Quite right, that is! Thanx you all for your interest in my beginners stupid questions. After trying out all the different solutions the simplest one is pow (n, 1/3) if this can interest anybody. Phil Charles 11-13-2003, 02:44 PM Originally posted by philonline Quite right, that is! Thanx you all for your interest in my beginners stupid questions. After trying out all the different solutions the simplest one is pow (n, 1/3) if this can interest anybody. Phil Like I demonstrated above. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |