Skip to content

Commit

Permalink
[ruby/matrix] Replace "iff" with "whether" [doc]
Browse files Browse the repository at this point in the history
iff means if and only if, but readers without that knowledge might
assume this to be a spelling mistake. To me, this seems like
exclusionary language that is unnecessary. Simply using "whether"
when describing return values should suffice.
  • Loading branch information
gmcgibbon authored and marcandre committed Jan 21, 2021
1 parent e34f51f commit 871b461
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ def zero?
#++

#
# Returns +true+ if and only if the two matrices contain equal elements.
# Returns whether the two matrices contain equal elements.
#
def ==(other)
return false unless Matrix === other &&
Expand Down Expand Up @@ -2134,7 +2134,7 @@ def collect2(v) # :yield: e1, e2
#++

#
# Returns +true+ iff all of vectors are linearly independent.
# Returns whether all of vectors are linearly independent.
#
# Vector.independent?(Vector[1,0], Vector[0,1])
# # => true
Expand All @@ -2152,7 +2152,7 @@ def Vector.independent?(*vs)
end

#
# Returns +true+ iff all of vectors are linearly independent.
# Returns whether all of vectors are linearly independent.
#
# Vector[1,0].independent?(Vector[0,1])
# # => true
Expand All @@ -2165,7 +2165,7 @@ def independent?(*vs)
end

#
# Returns +true+ iff all elements are zero.
# Returns whether all elements are zero.
#
def zero?
all?(&:zero?)
Expand Down Expand Up @@ -2193,7 +2193,7 @@ def freeze
#++

#
# Returns +true+ iff the two vectors have the same elements in the same order.
# Returns whether the two vectors have the same elements in the same order.
#
def ==(other)
return false unless Vector === other
Expand Down

0 comments on commit 871b461

Please sign in to comment.