Cau, hele nejak sem brouzdal po internetu a furt nedokažu najit jak se dela druha odmocnina :D pls poradíte mi?
PS: daval sem hledani a nenasel jsem to tu tzn nepiste mi sem ze to tu uz 100x bylo, díky
Fórum › .NET
Odmocnina

Asi jsi hledal špatně: http://www.google.cz/search?hl=cs&q=.net+square+root&btnG=Vyhledat+Googlem&lr=&aq=f&oq=
hmm, nechapu, nemohl by to tu nekdo napsat? vim ze odmocnina se počítá jako mocnina převrácené hodnoty mocnitele. Tedy např 3.odmocnina z "x" je "x" na (1/3)..... no ale jak to zapsat, pls neokecavejte to tu a neodkazujte na starnky kde to nepochopim :D
Druhá odmocnina:
Math.Sqrt(číslo)
A s mocninou by to mohlo být takhle:
Math.Pow(číslo, 1/2)
Myslel jsem si, že to bude opravdu triviální a že si někdo neumí najít na msdn metodu math, ale k mému překvapení to nejde ani mě. Když zadám Math, VS mi nenabídne metody, jako sqrt, či něco podobného... Ani jsem nenašel, jestli se to váže k nějakým referencím. Maximálně by to mohlo fungovat po importu referencí z XNA, ale to není řešení. Můžu se zeptat, ostatní přidávají nějaké reference, když se tady ohánějí funkcí Math.sqrt(float cislo)?
Edit: Tak jsem zjistil, že je vše korektní, když zapíšu celý název, čili System.Math.Sqrt(číslo)... Vážně mi chybí nějaká reference, ale System.Math možnost přidat nemám. Je to zvláštní.
Každopádně, k dotazu, použij funkci System.Math.Sqrt(číslo) a bude to v pořádku :-).

Přidej příspěvek
Ano, opravdu chci reagovat → zobrazí formulář pro přidání příspěvku
×Vložení zdrojáku
×Vložení obrázku
×Vložení videa
































Uživatelé prohlížející si toto vlákno
Podobná vlákna
N-tá odmocnina z x — založil Ondra
Odmocnina z exponentu — založil Spectator
Piata/0,4-tá Odmocnina — založil TheTim
Moderátoři diskuze