ratio#

swordfish.function.ratio()#

Returns element-by-element ratio of X to Y. Function ratio always returns floating numbers. If both X and Y are integer/long, ratio converts them into floating numbers and then conduct division. This is different from operator div (/) , which does not convert integer/long to floating numbers. Another difference with div is that Y can be negative integers when X is integer.

Parameters:
  • X (Constant) – A scalar/pair/vector/matrix.

  • Y (Constant) – A scalar/pair/vector/matrix.