-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRotation.go
More file actions
29 lines (26 loc) · 847 Bytes
/
Rotation.go
File metadata and controls
29 lines (26 loc) · 847 Bytes
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
package animatedledstrip
type rotation struct {
RotationType string `json:"type"`
XRotation float64 `json:"xRotation"`
YRotation float64 `json:"yRotation"`
ZRotation float64 `json:"zRotation"`
RotationOrder []string `json:"rotationOrder"`
}
func DegreesRotation(xRotation float64, yRotation float64, zRotation float64, rotationOrder []string) *rotation {
return &rotation{
RotationType: "DegreesRotation",
XRotation: xRotation,
YRotation: yRotation,
ZRotation: zRotation,
RotationOrder: rotationOrder,
}
}
func RadiansRotation(xRotation float64, yRotation float64, zRotation float64, rotationOrder []string) *rotation {
return &rotation{
RotationType: "RadiansRotation",
XRotation: xRotation,
YRotation: yRotation,
ZRotation: zRotation,
RotationOrder: rotationOrder,
}
}