diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-03 04:27:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-03 04:32:53 +0300 |
commit | a51f8f94d5dc7c0b8f61de35f277052144299662 (patch) | |
tree | d5f904b1b4058f563a267fc782d9c7cc7db28e43 | |
parent | 17f72be3cb7c50044a10c00e266253f5896f0770 (diff) |
Cleanup: use ascii characters instead of unicode where possible
Follow own code style docs.
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 3 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh.c | 2 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_lights.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 30d5a54b479..68ed3c239ef 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -1559,8 +1559,7 @@ void BKE_fcurve_correct_bezpart(const float v1[2], float v2[2], float v3[2], con } /** - . - * Find roots of cubic equation (c0 x³ + c1 x² + c2 x + c3) + * Find roots of cubic equation (c0 x^3 + c1 x^2 + c2 x + c3) * \return number of roots in `o`. * * \note it is up to the caller to allocate enough memory for `o`. diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index 5e879d41d43..69bb61a4f7d 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -1724,7 +1724,7 @@ static int bm_loop_normal_mark_indiv(BMesh *bm, BLI_bitmap *loops, const bool do if (use_sel_face_history) { /* Using face history allows to select a single loop from a single face... - * Note that this is On² piece of code, + * Note that this is O(n^2) piece of code, * but it is not designed to be used with huge selection sets, * rather with only a few items selected at most.*/ /* Goes from last selected to the first selected element. */ diff --git a/source/blender/draw/engines/eevee/eevee_lights.c b/source/blender/draw/engines/eevee/eevee_lights.c index cba86d058ea..e23a5a81169 100644 --- a/source/blender/draw/engines/eevee/eevee_lights.c +++ b/source/blender/draw/engines/eevee/eevee_lights.c @@ -96,7 +96,7 @@ static float light_shape_power_get(const Light *la, const EEVEE_Light *evli) } } else if (ELEM(la->type, LA_SPOT, LA_LOCAL)) { - power = 1.0f / (4.0f * evli->radius * evli->radius * M_PI * M_PI); /* 1/(4*r²*Pi²) */ + power = 1.0f / (4.0f * evli->radius * evli->radius * M_PI * M_PI); /* `1/(4*(r^2)*(Pi^2))` */ /* for point lights (a.k.a radius == 0.0) */ // power = M_PI * M_PI * 0.78; /* XXX : Empirical, Fit cycles power */ @@ -106,7 +106,7 @@ static float light_shape_power_get(const Light *la, const EEVEE_Light *evli) /* Make illumination power closer to cycles for bigger radii. Cycles uses a cos^3 term that we * cannot reproduce so we account for that by scaling the light power. This function is the * result of a rough manual fitting. */ - power += 1.0f / (2.0f * M_PI); /* power *= 1 + r²/2 */ + power += 1.0f / (2.0f * M_PI); /* `power *= 1 + (r^2)/2` */ } return power; } @@ -257,7 +257,7 @@ void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) float power = max_fff(UNPACK3(evli->color)) * evli->volume; if (power > 0.0f && evli->light_type != LA_SUN) { /* The limit of the power attenuation function when the distance to the light goes to 0 is - * 2 / r² where r is the light radius. We need to find the right radius that emits at most + * `2 / r^2` where r is the light radius. We need to find the right radius that emits at most * the volume light upper bound. Inverting the function we get: */ float min_radius = 1.0f / sqrtf(0.5f * upper_bound / power); /* Square it here to avoid a multiplication inside the shader. */ diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index aefb77c4077..8f596ec6a5c 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -599,7 +599,7 @@ static void uilist_filter_items(uiList *ui_list, items_shown = flt_data->items_shown = shown_idx; flt_data->items_filter_neworder = MEM_mallocN(sizeof(int) * items_shown, __func__); /* And now, bring back new indices into the [0, items_shown[ range! - * XXX This is O(N²)... :/ + * XXX This is O(N^2). :/ */ for (shown_idx = 0, prev_ni = -1; shown_idx < items_shown; shown_idx++) { for (i = 0, t_ni = len, t_idx = -1; i < items_shown; i++) { |