Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
DB Tsai committed Nov 26, 2014
1 parent c1a877c commit dbed124
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ sealed trait Vector extends Serializable {
if (p == 1) {
var sum = 0.0
var i = 0
while(i < size) {
while (i < size) {
sum += math.abs(values(i))
i += 1
}
sum
} else if (p == 2) {
var sum = 0.0
var i = 0
while(i < size) {
while (i < size) {
sum += values(i) * values(i)
i += 1
}
Expand All @@ -117,7 +117,7 @@ sealed trait Vector extends Serializable {
var i = 0
while (i < size) {
val value = math.abs(values(i))
if(value > max) max = value
if (value > max) max = value
i += 1
}
max
Expand Down

0 comments on commit dbed124

Please sign in to comment.