-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsuvatsolver
More file actions
103 lines (102 loc) · 3.38 KB
/
suvatsolver
File metadata and controls
103 lines (102 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import SwiftUI
struct ContentView: View {
@State var km = 0.00
@State var mile = 0.00
@State var time = 0.00
@State var velocity = 0.00
var body: some View {
VStack{
Text("SUVAT SOLVER")
.fontWeight(/*@START_MENU_TOKEN@*/.bold/*@END_MENU_TOKEN@*/)
.font(.title)
.padding()
.padding()
.padding()
.padding()
.padding()
.foregroundColor(.black)
HStack {
Text("Displacement")
.padding()
TextField("Quantity 1", value: $km, format: .number)
.textFieldStyle(.roundedBorder)
.border(.cyan, width:4)
.keyboardType(.decimalPad)
}
HStack {
Text("Initial velocity")
.padding()
TextField("Quantity 1", value: $mile, format: .number)
.textFieldStyle(.roundedBorder)
.border(.green, width:4)
.keyboardType(.decimalPad)
}
HStack {
Text("Final velocity")
.padding()
TextField("Quantity 1", value: $mile, format: .number)
.textFieldStyle(.roundedBorder)
.border(.black, width:4)
.keyboardType(.decimalPad)
}
}
HStack {
Text("Acceleration")
.padding()
TextField("Quantity 1", value: $mile, format: .number)
.textFieldStyle(.roundedBorder)
.border(.gray, width:4)
.keyboardType(.decimalPad)
}
HStack {
Text("Time")
.padding()
TextField("Quantity 1", value: $mile, format: .number)
.textFieldStyle(.roundedBorder)
.border(.indigo, width:4)
.keyboardType(.decimalPad)
}
TabView {
Text("displacement:")
.bold()
.foregroundColor(.cyan)
.dynamicTypeSize(/*@START_MENU_TOKEN@*/.xLarge/*@END_MENU_TOKEN@*/)
.font(.title3)
.tabItem {
Label("s", systemImage: "star")
}
Text("initial velocity:")
.bold()
.foregroundColor(.green)
.dynamicTypeSize(.xLarge)
.font(.title3)
.tabItem {
Label("u", systemImage: "square")
}
Text("final velocity:")
.bold()
.foregroundColor(.black)
.dynamicTypeSize(.xLarge)
.font(.title3)
.tabItem {
Label("v", systemImage: "oval")
}
Text("acceleration:")
.bold()
.foregroundColor(.gray)
.dynamicTypeSize(.xLarge)
.font(.title3)
.tabItem {
Label("a", systemImage: "rectangle")
}
Text("time:")
.bold()
.foregroundColor(.indigo)
.dynamicTypeSize(.xLarge)
.font(.title3)
.tabItem {
Label("t", systemImage: "circle")
}
}
}
}