FUNCTION dot_product

(* SCHEMA step_merged_ap_schema; *)
-- DIFF IN AP214
-- DIFF IN AP203e2
-- DIFF IN AP238 STEP-NC
-- DIFF IN AP224
-- DIFF IN AP232
FUNCTION dot_product
      (arg1 : direction;
       arg2 : direction ) : REAL;
   LOCAL
      scalar : REAL;
      vec1 : direction;
      vec2 : direction;
      ndim : INTEGER;
   END_LOCAL;
      IF NOT EXISTS(arg1) OR NOT EXISTS(arg2) THEN
         scalar := ?;
      ELSE
         IF arg1.dim <> arg2.dim THEN
            scalar := ?;
         ELSE
            BEGIN
               vec1 := normalise(arg1);
               vec2 := normalise(arg2);
               ndim := arg1.dim;
               scalar := 0;
               REPEAT i := 1 TO ndim BY 1;
                  scalar := scalar + vec1.direction_ratios[i] * vec2.direction_ratios[i];
               END_REPEAT;
            END;
         END_IF;
      END_IF;
      RETURN (scalar);
END_FUNCTION;

Referenced By

Defintion dot_product is references by the following definitions:
DefinitionType
 above_plane FUNCTION
 base_axis FUNCTION
 extruded_area_solid ENTITY
 extruded_face_solid ENTITY
 first_proj_axis FUNCTION
 implicit_point_on_plane ENTITY
 second_proj_axis FUNCTION
 view_volume ENTITY


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2017-01-19T11:17:24-05:00