Lines Matching defs:arg1

133  * result = arg1 < arg2
135 static inline bool dc_fixpt_lt(struct fixed31_32 arg1, struct fixed31_32 arg2)
137 return arg1.value < arg2.value;
142 * result = arg1 <= arg2
144 static inline bool dc_fixpt_le(struct fixed31_32 arg1, struct fixed31_32 arg2)
146 return arg1.value <= arg2.value;
151 * result = arg1 == arg2
153 static inline bool dc_fixpt_eq(struct fixed31_32 arg1, struct fixed31_32 arg2)
155 return arg1.value == arg2.value;
160 * result = min(arg1, arg2) := (arg1 <= arg2) ? arg1 : arg2
162 static inline struct fixed31_32 dc_fixpt_min(struct fixed31_32 arg1, struct fixed31_32 arg2)
164 if (arg1.value <= arg2.value)
165 return arg1;
172 * result = max(arg1, arg2) := (arg1 <= arg2) ? arg2 : arg1
174 static inline struct fixed31_32 dc_fixpt_max(struct fixed31_32 arg1, struct fixed31_32 arg2)
176 if (arg1.value <= arg2.value)
179 return arg1;
243 * result = arg1 + arg2
245 static inline struct fixed31_32 dc_fixpt_add(struct fixed31_32 arg1, struct fixed31_32 arg2)
249 ASSERT(((arg1.value >= 0) && (LLONG_MAX - arg1.value >= arg2.value)) ||
250 ((arg1.value < 0) && (LLONG_MIN - arg1.value <= arg2.value)));
252 res.value = arg1.value + arg2.value;
259 * result = arg1 + arg2
261 static inline struct fixed31_32 dc_fixpt_add_int(struct fixed31_32 arg1, int arg2)
263 return dc_fixpt_add(arg1, dc_fixpt_from_int(arg2));
268 * result = arg1 - arg2
270 static inline struct fixed31_32 dc_fixpt_sub(struct fixed31_32 arg1, struct fixed31_32 arg2)
274 ASSERT(((arg2.value >= 0) && (LLONG_MIN + arg2.value <= arg1.value)) ||
275 ((arg2.value < 0) && (LLONG_MAX + arg2.value >= arg1.value)));
277 res.value = arg1.value - arg2.value;
284 * result = arg1 - arg2
286 static inline struct fixed31_32 dc_fixpt_sub_int(struct fixed31_32 arg1, int arg2)
288 return dc_fixpt_sub(arg1, dc_fixpt_from_int(arg2));
299 * result = arg1 * arg2
301 struct fixed31_32 dc_fixpt_mul(struct fixed31_32 arg1, struct fixed31_32 arg2);
306 * result = arg1 * arg2
308 static inline struct fixed31_32 dc_fixpt_mul_int(struct fixed31_32 arg1, int arg2)
310 return dc_fixpt_mul(arg1, dc_fixpt_from_int(arg2));
321 * result = arg1 / arg2
323 static inline struct fixed31_32 dc_fixpt_div_int(struct fixed31_32 arg1, long long arg2)
325 return dc_fixpt_from_fraction(arg1.value, dc_fixpt_from_int((int)arg2).value);
330 * result = arg1 / arg2
332 static inline struct fixed31_32 dc_fixpt_div(struct fixed31_32 arg1, struct fixed31_32 arg2)
334 return dc_fixpt_from_fraction(arg1.value, arg2.value);
421 * result = pow(arg1, arg2)
424 * Currently, abs(arg1) should be less than 1. Take care!
426 static inline struct fixed31_32 dc_fixpt_pow(struct fixed31_32 arg1, struct fixed31_32 arg2)
428 if (arg1.value == 0)
433 dc_fixpt_log(arg1),