example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/util.rb in urbanopt-cli-0.10.0 vs example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/util.rb in urbanopt-cli-0.11.0
- old
+ new
@@ -1,5 +1,10 @@
+# *********************************************************************************
+# URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
+# See also https://github.com/urbanopt/urbanopt-cli/blob/develop/LICENSE.md
+# *********************************************************************************
+
# frozen_string_literal: true
class MathTools
def self.valid_float?(str)
!!Float(str) rescue false
@@ -94,11 +99,11 @@
z float result of bicubic polynomial
'''
if c.size != 10
puts 'Error: There must be 10 coefficients in a bicubic polynomial'
end
- z = c[0] + c[1] * x + c[2] * y + c[3] * x**2 + c[4] * x * y + c[5] * y**2 + \
- c[6] * x**3 + c[7] * y * x**2 + c[8] * x * y**2 + c[9] * y**3
+ z = c[0] + c[1] * x + c[2] * x**2 + c[3] * y + c[4] * y**2 + c[5] * x * y + \
+ c[6] * x**3 + c[7] * y**3 + c[8] * x**2 * y + c[9] * x * y**2
return z
end
def self.Iterate(x0, f0, x1, f1, x2, f2, icount, cvg)