Skip to content

Commit c83ee12

Browse files
committed
fix alignment in math set_item
1 parent 04548db commit c83ee12

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

vm/src/stdlib/math.rs

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -207,54 +207,54 @@ pub fn mk_module(ctx: &PyContext) -> PyObjectRef {
207207
let py_mod = ctx.new_module(&"math".to_string(), ctx.new_scope(None));
208208

209209
// Number theory functions:
210-
py_mod.set_item("fabs", ctx.new_rustfunc(math_fabs));
210+
py_mod.set_item("fabs", ctx.new_rustfunc(math_fabs));
211211
py_mod.set_item("isfinite", ctx.new_rustfunc(math_isfinite));
212-
py_mod.set_item("isinf", ctx.new_rustfunc(math_isinf));
213-
py_mod.set_item("isnan", ctx.new_rustfunc(math_isnan));
212+
py_mod.set_item("isinf", ctx.new_rustfunc(math_isinf));
213+
py_mod.set_item("isnan", ctx.new_rustfunc(math_isnan));
214214

215215
// Power and logarithmic functions:
216-
py_mod.set_item("exp", ctx.new_rustfunc(math_exp));
217-
py_mod.set_item("expm1", ctx.new_rustfunc(math_expm1));
218-
py_mod.set_item("log", ctx.new_rustfunc(math_log));
219-
py_mod.set_item("log1p", ctx.new_rustfunc(math_log1p));
220-
py_mod.set_item("log2", ctx.new_rustfunc(math_log2));
221-
py_mod.set_item("log10", ctx.new_rustfunc(math_log10));
222-
py_mod.set_item("pow", ctx.new_rustfunc(math_pow));
223-
py_mod.set_item("sqrt", ctx.new_rustfunc(math_sqrt));
216+
py_mod.set_item("exp", ctx.new_rustfunc(math_exp));
217+
py_mod.set_item("expm1", ctx.new_rustfunc(math_expm1));
218+
py_mod.set_item("log", ctx.new_rustfunc(math_log));
219+
py_mod.set_item("log1p", ctx.new_rustfunc(math_log1p));
220+
py_mod.set_item("log2", ctx.new_rustfunc(math_log2));
221+
py_mod.set_item("log10", ctx.new_rustfunc(math_log10));
222+
py_mod.set_item("pow", ctx.new_rustfunc(math_pow));
223+
py_mod.set_item("sqrt", ctx.new_rustfunc(math_sqrt));
224224

225225
// Trigonometric functions:
226-
py_mod.set_item("acos", ctx.new_rustfunc(math_acos));
227-
py_mod.set_item("asin", ctx.new_rustfunc(math_asin));
228-
py_mod.set_item("atan", ctx.new_rustfunc(math_atan));
229-
py_mod.set_item("atan2", ctx.new_rustfunc(math_atan2));
230-
py_mod.set_item("cos", ctx.new_rustfunc(math_cos));
231-
py_mod.set_item("hypot", ctx.new_rustfunc(math_hypot));
232-
py_mod.set_item("sin", ctx.new_rustfunc(math_sin));
233-
py_mod.set_item("tan", ctx.new_rustfunc(math_tan));
234-
235-
py_mod.set_item("degrees", ctx.new_rustfunc(math_degrees));
236-
py_mod.set_item("radians", ctx.new_rustfunc(math_radians));
226+
py_mod.set_item("acos", ctx.new_rustfunc(math_acos));
227+
py_mod.set_item("asin", ctx.new_rustfunc(math_asin));
228+
py_mod.set_item("atan", ctx.new_rustfunc(math_atan));
229+
py_mod.set_item("atan2", ctx.new_rustfunc(math_atan2));
230+
py_mod.set_item("cos", ctx.new_rustfunc(math_cos));
231+
py_mod.set_item("hypot", ctx.new_rustfunc(math_hypot));
232+
py_mod.set_item("sin", ctx.new_rustfunc(math_sin));
233+
py_mod.set_item("tan", ctx.new_rustfunc(math_tan));
234+
235+
py_mod.set_item("degrees", ctx.new_rustfunc(math_degrees));
236+
py_mod.set_item("radians", ctx.new_rustfunc(math_radians));
237237

238238
// Hyperbolic functions:
239-
py_mod.set_item("acosh", ctx.new_rustfunc(math_acosh));
240-
py_mod.set_item("asinh", ctx.new_rustfunc(math_asinh));
241-
py_mod.set_item("atanh", ctx.new_rustfunc(math_atanh));
242-
py_mod.set_item("cosh", ctx.new_rustfunc(math_cosh));
243-
py_mod.set_item("sinh", ctx.new_rustfunc(math_sinh));
244-
py_mod.set_item("tanh", ctx.new_rustfunc(math_tanh));
239+
py_mod.set_item("acosh", ctx.new_rustfunc(math_acosh));
240+
py_mod.set_item("asinh", ctx.new_rustfunc(math_asinh));
241+
py_mod.set_item("atanh", ctx.new_rustfunc(math_atanh));
242+
py_mod.set_item("cosh", ctx.new_rustfunc(math_cosh));
243+
py_mod.set_item("sinh", ctx.new_rustfunc(math_sinh));
244+
py_mod.set_item("tanh", ctx.new_rustfunc(math_tanh));
245245

246246
// Special functions:
247-
py_mod.set_item("erf", ctx.new_rustfunc(math_erf));
248-
py_mod.set_item("erfc", ctx.new_rustfunc(math_erfc));
249-
py_mod.set_item("gamma", ctx.new_rustfunc(math_gamma));
250-
py_mod.set_item("lgamma", ctx.new_rustfunc(math_lgamma));
247+
py_mod.set_item("erf", ctx.new_rustfunc(math_erf));
248+
py_mod.set_item("erfc", ctx.new_rustfunc(math_erfc));
249+
py_mod.set_item("gamma", ctx.new_rustfunc(math_gamma));
250+
py_mod.set_item("lgamma", ctx.new_rustfunc(math_lgamma));
251251

252252
// Constants:
253-
py_mod.set_item("pi", ctx.new_float(std::f64::consts::PI)); // 3.14159...
254-
py_mod.set_item("e", ctx.new_float(std::f64::consts::E)); // 2.71..
255-
py_mod.set_item("tau", ctx.new_float(2.0 * std::f64::consts::PI));
256-
py_mod.set_item("inf", ctx.new_float(std::f64::INFINITY));
257-
py_mod.set_item("nan", ctx.new_float(std::f64::NAN));
253+
py_mod.set_item("pi", ctx.new_float(std::f64::consts::PI)); // 3.14159...
254+
py_mod.set_item("e", ctx.new_float(std::f64::consts::E)); // 2.71..
255+
py_mod.set_item("tau", ctx.new_float(2.0 * std::f64::consts::PI));
256+
py_mod.set_item("inf", ctx.new_float(std::f64::INFINITY));
257+
py_mod.set_item("nan", ctx.new_float(std::f64::NAN));
258258

259259
py_mod
260260
}

0 commit comments

Comments
 (0)