tools: format most examples and tutorials, add them to v test-cleancode (#9826)

This commit is contained in:
Lukas Neubert 2021-04-20 16:16:35 +02:00 committed by GitHub
parent dff50686d6
commit 16e79bc3ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 471 additions and 433 deletions

View file

@ -20,7 +20,7 @@ pub fn (mut v Vec2) from(src Vec2) {
// * Addition
// + operator overload. Adds two vectors
pub fn (v1 Vec2) +(v2 Vec2) Vec2 {
pub fn (v1 Vec2) + (v2 Vec2) Vec2 {
return Vec2{v1.x + v2.x, v1.y + v2.y}
}
@ -43,7 +43,7 @@ pub fn (mut v Vec2) plus_f64(scalar f64) {
}
// * Subtraction
pub fn (v1 Vec2) -(v2 Vec2) Vec2 {
pub fn (v1 Vec2) - (v2 Vec2) Vec2 {
return Vec2{v1.x - v2.x, v1.y - v2.y}
}
@ -66,7 +66,7 @@ pub fn (mut v Vec2) subtract_f64(scalar f64) {
}
// * Multiplication
pub fn (v1 Vec2) *(v2 Vec2) Vec2 {
pub fn (v1 Vec2) * (v2 Vec2) Vec2 {
return Vec2{v1.x * v2.x, v1.y * v2.y}
}