File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version" : " 0.2.0" ,
6
+ "configurations" : [
7
+ {
8
+ "name" : " Launch test package" ,
9
+ "type" : " go" ,
10
+ "request" : " launch" ,
11
+ "mode" : " test" ,
12
+ "program" : " ${workspaceFolder}"
13
+ },
14
+ ]
15
+ }
Original file line number Diff line number Diff line change @@ -11,6 +11,24 @@ import (
11
11
12
12
type Stats struct {
13
13
data []float64
14
+ << << << < HEAD
15
+ == == == =
16
+ }
17
+
18
+ func (s * Stats ) Add (x ... float64 ) {
19
+ s .data = append (s .data , x ... )
20
+ }
21
+
22
+ func (s * Stats ) Mean () float64 {
23
+ var x float64
24
+ x = 0
25
+ var i int
26
+ for i = 0 ; i < len (s .data ); i ++ {
27
+ x = x + s .data [i ]
28
+ }
29
+ x = x / float64 (len (s .data ))
30
+ return x
31
+ >> >> >> > 0 f9b86ae1a2b000d67c9ba77109ccad2af6711d5
14
32
}
15
33
16
34
func (s * Stats ) Add (x ... float64 ) {
You can’t perform that action at this time.
0 commit comments