Skip to content

Conversation

@information278
Copy link

внесены изменения по комментариям в 4 лабе, выполнена 6

Comment on lines +8 to +29
func Calculate(x float64) float64 {
if math.Abs(x) >= 1 {
return (math.Pow(1.2, x)) - (math.Pow(x, 1.2))
}
return math.Acos(x)
}

func TaskA(Xmin, Xmax, Xdel float64) []float64 {
var y []float64
for x := Xmin; x <= Xmax; x += Xdel {
y = append(y, Calculate(x))
}
return y
}

func TaskB(x [5]float64) []float64 {
var y []float64
for _, value := range x {
y = append(y, Calculate(value))
}
return y
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нет смысла делать их публичными, вы используете их только внутри пакета

return y
}

func Runlab4() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CamelCase соблюдайте во всем проекте

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants