Cleanup: spelling in comments

This commit is contained in:
Campbell Barton
2023-11-09 09:34:50 +11:00
parent 6bba008325
commit 58ea0e051f
11 changed files with 25 additions and 25 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ ccl_device_forceinline float intersection_t_offset(const float t)
* always return smallest normalized value. If a denormalized zero is returned
* it will cause false-positive intersection detection with a distance of 0.
*
* The check relies on the fact that comparison of de-normal values with zero
* The check relies on the fact that comparison of denormal values with zero
* returns true. */
if (t == 0.0f) {
/* The exact bit value of this should be 0x1p-126, but hex floating point values notation is
+1 -1
View File
@@ -131,7 +131,7 @@ void kernel_gpu_##name::run(thread MetalKernelContext& context, \
#else
/* On macOS versions before 14.x, builtin constants (e.g. metal_global_id) must
* be accessed through attributed entrypoint parameters. */
* be accessed through attributed entry-point parameters. */
#define ccl_gpu_kernel_signature(name, ...) \
struct kernel_gpu_##name \
+1 -1
View File
@@ -255,7 +255,7 @@ int insert_vert_fcurve(
beztr.back = 1.70158f;
/* "elastic" easing - Values here were hand-optimized for a default duration of
* ~10 frames (typical mograph motion length) */
* ~10 frames (typical motion-graph motion length). */
beztr.amplitude = 0.8f;
beztr.period = 4.1f;
+6 -6
View File
@@ -192,18 +192,18 @@ template<typename T> inline T safe_acos(const T &a)
return math::acos((a));
}
/* Faster/approximate version of acosf. Max error 4.51803e-5 (0.00258 degrees).*/
/** Faster/approximate version of `acosf`. Max error 4.51803e-5 (0.00258 degrees). */
inline float safe_acos_approx(float x)
{
const float f = fabsf(x);
/* clamp and crush denormals. */
/* Clamp and crush denormals. */
const float m = (f < 1.0f) ? 1.0f - (1.0f - f) : 1.0f;
/* Based on http://www.pouet.net/topic.php?which=9132&page=2
* 85% accurate (ULP 0)
* Examined 2130706434 values of acos:
* 15.2000597 avg ULP diff, 4492 max ULP, 4.51803e-05 max error // without "denormal crush"
* Examined 2130706434 values of acos:
* 15.2007108 avg ULP diff, 4492 max ULP, 4.51803e-05 max error // with "denormal crush"
* Examined 2130706434 values of `acos`:
* 15.2000597 avg ULP diff, 4492 max ULP, 4.51803e-05 max error // without "denormal crush".
* Examined 2130706434 values of `acos`:
* 15.2007108 avg ULP diff, 4492 max ULP, 4.51803e-05 max error // with "denormal crush".
*/
const float a = sqrtf(1.0f - m) *
(1.5707963267f + m * (-0.213300989f + m * (0.077980478f + m * -0.02164095f)));
+5 -7
View File
@@ -3336,18 +3336,16 @@ static bool point_in_slice(const float p[3],
const float l1[3],
const float l2[3])
{
/*
* what is a slice ?
* some maths:
/* What is a slice?
* Some math:
* a line including (l1, l2) and a point not on the line
* define a subset of R3 delimited by planes parallel to the line and orthogonal
* to the (point --> line) distance vector, one plane on the line one on the point,
* the room inside usually is rather small compared to R3 though still infinite
* useful for restricting (speeding up) searches
* e.g. all points of triangular prism are within the intersection of 3 'slices'
* another trivial case : cube
* but see a 'spat' which is a deformed cube with paired parallel planes needs only 3 slices too
*/
* e.g. all points of triangular prism are within the intersection of 3 "slices"
* Another trivial case is a cube, but see a "spat" which is a deformed cube
* with paired parallel planes needs only 3 slices too. */
float h, rp[3], cp[3], q[3];
closest_to_line_v3(cp, v1, l1, l2);
@@ -249,7 +249,7 @@ void FullFrameExecutionModel::get_output_render_area(NodeOperation *output_op, r
/* Get border with normalized coordinates. */
const rctf *norm_border = has_viewer_border ? border_.viewer_border : border_.render_border;
/* Return de-normalized border within canvas. */
/* Return denormalized border within canvas. */
const int w = output_op->get_width();
const int h = output_op->get_height();
r_area.xmin = canvas.xmin + norm_border->xmin * w;
+3 -3
View File
@@ -78,7 +78,7 @@ MTLFrameBuffer::~MTLFrameBuffer()
}
}
/* Free colour attachment descriptors. */
/* Free color attachment descriptors. */
for (int i = 0; i < GPU_FB_MAX_COLOR_ATTACHMENT; i++) {
if (colour_attachment_descriptors_[i] != nil) {
[colour_attachment_descriptors_[i] release];
@@ -717,7 +717,7 @@ void MTLFrameBuffer::update_attachments(bool /*update_viewport*/)
case GPU_FB_COLOR_ATTACHMENT5: {
int color_slot_ind = type - GPU_FB_COLOR_ATTACHMENT0;
if (attach.tex) {
/* If we already had a colour attachment, preserve load/clear-state parameters,
/* If we already had a color attachment, preserve load/clear-state parameters,
* but remove existing and add new attachment. */
if (this->has_attachment_at_slot(color_slot_ind)) {
MTLAttachment color_attachment_prev = this->get_color_attachment(color_slot_ind);
@@ -1696,7 +1696,7 @@ MTLRenderPassDescriptor *MTLFrameBuffer::bake_render_pass_descriptor(bool load_c
atIndexedSubscript:attachment_ind];
}
else {
/* Disable colour attachment. */
/* Disable color attachment. */
[framebuffer_descriptor_[descriptor_config].colorAttachments setObject:nil
atIndexedSubscript:attachment_ind];
}
+2 -2
View File
@@ -3257,8 +3257,8 @@ void SEQ_effect_text_font_load(TextVars *data, const bool do_id_user)
* This code can be called from non-main thread, e.g. when copying sequences as part of
* depsgraph CoW copy of the evaluated scene. Just skip font loading in that case, BLF code
* is not thread-safe, and if this happens from threaded context, it almost certainly means
* that a previous atempt to load the font already failed, e.g. because font filepath is
* invalid. Propoer fix would likely be to not attempt to reload a failed-to-load font every
* that a previous attempt to load the font already failed, e.g. because font file-path is
* invalid. Proposer fix would likely be to not attempt to reload a failed-to-load font every
* time. */
BLI_path_abs(filepath, ID_BLEND_PATH_FROM_GLOBAL(&vfont->id));
@@ -1474,8 +1474,8 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *region, void *user_
UI_block_flag_disable(block, UI_BLOCK_LOOP);
UI_block_theme_style_set(block, UI_BLOCK_THEME_STYLE_REGULAR);
/* intentionally don't use 'UI_BLOCK_MOVEMOUSE_QUIT', some dialogues have many items
* where quitting by accident is very annoying */
/* Intentionally don't use #UI_BLOCK_MOVEMOUSE_QUIT, some dialogs have many items
* where quitting by accident is very annoying. */
UI_block_flag_enable(block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_NUMSELECT);
uiLayout *layout = UI_block_layout(
@@ -2145,7 +2145,7 @@ static bool wm_main_playanim_intern(int argc, const char **argv, PlayArgs *args_
BLF_exit();
/* NOTE: Must happen before GPU Context destruction as GPU resources are released via
* Colour Management module. */
* Color Management module. */
IMB_exit();
if (ps.ghost_data.gpu_context) {
@@ -107,7 +107,9 @@ dict_custom = {
"denoised",
"denoiser",
"denoising",
"denormal",
"denormalized",
"denormals",
"dereference",
"dereferenced",
"dereferences",