title: Check Line Passes Origin
signature: function checkLinePassesOrigin(x1: number, y1: number, x2: number, y2: number): boolean {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: boolean, expected: boolean): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(x1: number, y1: number, x2: number, y2: number, expected:boolean): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(x1, y1, x2, y2),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(1, 28, 2, 56, true);
    console.log(`TEST-0...${result}`);
  
    result = driver(10, 0, 20, 0, true);
    console.log(`TEST-1...${result}`);
  
    result = driver(0, 1, 0, 17, true);
    console.log(`TEST-2...${result}`);
  
    result = driver(1, 1, 10, 10, true);
    console.log(`TEST-3...${result}`);
  
    result = driver(82, 86, 19, 4, false);
    console.log(`TEST-4...${result}`);
  
    result = driver(78, 86, 11, 6, false);
    console.log(`TEST-5...${result}`);
  
    result = driver(13, 46, 33, 33, false);
    console.log(`TEST-6...${result}`);
  
    result = driver(18, 29, 95, 12, false);
    console.log(`TEST-7...${result}`);
  
    result = driver(42, 35, 25, 36, false);
    console.log(`TEST-8...${result}`);
  
    result = driver(29, 17, 45, 35, false);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
source_py: def check_line_passes_origin(x1, y1, x2, y2):
      return ((x1 * (y2 - y1)) == (y1 * (x2 - x1)))
source_cpp: bool check_line_passes_origin(int x1, int y1, int x2, int y2) {
    return ( x1 * ( y2 - y1 ) == y1 * ( x2 - x1 ) );
  }