How do I get the square root of a double number value?

i am using big numbers, so I use a double variable, and mathf.sqrt does not work with doubles, is there another way?

Hello there,

This thread might prove a good read for you.

Basically, use Math.Sqrt instead!

Hope that helps!

Cheers,

~LegendBacon

Hey there,

the Mathf.sqrt function is for floats as the Mathf indicates.

Using Math.Sqrt should work for doubles. In case that is not naturally in your script then append a using System; or just write System.Math.Sqrt();

hope this helps! Here is the link for the msdn reference.

thank you so much.