- complètement remanié les scripts pour le WIFI, mais ce n'est pas encore terminé
This commit is contained in:
@@ -1,24 +1,49 @@
|
||||
-- tests des routines trigonométriques pour NodeMCU
|
||||
print("\ntest_trigo1.lua zf180820.2209 \n")
|
||||
print("\ntest_trigo1.lua zf1808201.1758 \n")
|
||||
|
||||
-- chargement des routines trigonométriques
|
||||
dofile("trigo3.lua")
|
||||
|
||||
for i = 0, 2*math.pi, 2*math.pi/32 do
|
||||
for i = 0, 4*math.pi, 4*math.pi/64 do
|
||||
a=i
|
||||
-- b=math.tan(a)
|
||||
-- print("arctangente: "..a..", "..b..", "..math.atan(b)..", "..zatan(b)..", "..math.atan(b)/zatan(b))
|
||||
b=math.tan(a)
|
||||
print("arctangente: "..a..", "..b..", "..math.atan(b)..", "..zatan(b)..", "..math.atan(b)/zatan(b))
|
||||
|
||||
-- print("sinus: "..a..", "..math.sin(a)..", "..zsin(a)..", "..math.sin(a)/zsin(a))
|
||||
-- print("cosinus: "..a..", "..math.cos(a)..", "..zcos(a)..", "..math.cos(a)/zcos(a))
|
||||
-- print("tangente: "..a..", "..math.tan(a)..", "..ztan(a)..", "..math.tan(a)/ztan(a))
|
||||
-- b=math.sin(a)
|
||||
b=math.sin(a)
|
||||
-- print("arcsinus: "..a..", "..b..", "..math.asin(b)..", "..zasin(b)..", "..math.asin(b)/zasin(b))
|
||||
|
||||
b=math.cos(a)
|
||||
print("arccosinus: "..a..", "..b..", "..math.acos(b)..", "..zacos(b)..", "..math.acos(b)/zacos(b))
|
||||
-- print("arccosinus: "..a..", "..b..", "..math.acos(b)..", "..zacos(b)..", "..math.acos(b)/zacos(b))
|
||||
|
||||
end
|
||||
|
||||
print("\n")
|
||||
x=-0.70710678118655
|
||||
print(math.acos(x))
|
||||
print(zatan(math.sqrt(1-x*x)/x))
|
||||
print(math.sqrt(1-x*x)/x)
|
||||
y=2.5525440310417
|
||||
print("y: "..y)
|
||||
x=math.cos(y)
|
||||
print("x: "..x)
|
||||
print("math.acos: "..math.acos(x))
|
||||
z=math.sqrt(1-x*x)/x
|
||||
print("z: "..z)
|
||||
print("zatan: "..zatan(z))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user