How to calculate the square root of a number?

45 views
Skip to first unread message

Neha Jain

unread,
Aug 11, 2015, 10:31:27 AM8/11/15
to JSXGraph
HI,

I am new to JSXGraph and unable to find a method for finding the square root of a number using JSXGraph. Please help.

Regards,
Neha

Alfred Wassermann

unread,
Aug 12, 2015, 8:47:39 AM8/12/15
to JSXGraph
Please use the JavaScript Math object:

Math.sqrt(number);


JSXGraph also provides the method 'JXG.Math.pow()'. Example:

JXG.Math.pow(number, 0.5);

But the first version is much faster.

Best wishes,
Alfred

Neha Jain

unread,
Aug 12, 2015, 8:54:30 AM8/12/15
to jsxg...@googlegroups.com
Thank You.. I figured this:
Math.sqrt(number);


later..

Thanks,
Neha

--
You received this message because you are subscribed to a topic in the Google Groups "JSXGraph" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jsxgraph/65q_4Tv-feM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jsxgraph+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages