Cleanup: spelling in comments

Also move notes about where noise functions come from
into the function body as it's not relavant to the public doc-string.
This commit is contained in:
Campbell Barton 2021-12-13 16:22:20 +11:00
parent 8ad2642c47
commit 36c6b2e893
8 changed files with 17 additions and 17 deletions

View File

@ -333,8 +333,8 @@ double closest_to_line_v2_db(double r_close[2],
const double l1[2],
const double l2[2]);
/**
* Find closest point to p on line through (l1, l2) and return lambda,
* where (0 <= lambda <= 1) when cp is in the line segment (l1, l2).
* Find closest point to p on line through (`l1`, `l2`) and return lambda,
* where (0 <= lambda <= 1) when `p` is in the line segment (`l1`, `l2`).
*/
float closest_to_line_v3(float r_close[3], const float p[3], const float l1[3], const float l2[3]);
/**

View File

@ -245,8 +245,6 @@ float musgrave_hybrid_multi_fractal(const float4 co,
* \param H: fractal increment parameter.
* \param lacunarity: gap between successive frequencies.
* \param octaves: number of frequencies in the fBm.
*
* \param from "Texturing and Modelling: A procedural approach".
*/
float musgrave_fBm(const float co, const float H, const float lacunarity, const float octaves);
@ -256,8 +254,6 @@ float musgrave_fBm(const float co, const float H, const float lacunarity, const
* \param H: fractal increment parameter.
* \param lacunarity: gap between successive frequencies.
* \param octaves: number of frequencies in the fBm.
*
* \param from "Texturing and Modelling: A procedural approach".
*/
float musgrave_fBm(const float2 co, const float H, const float lacunarity, const float octaves);
/**
@ -266,8 +262,6 @@ float musgrave_fBm(const float2 co, const float H, const float lacunarity, const
* \param H: fractal increment parameter.
* \param lacunarity: gap between successive frequencies.
* \param octaves: number of frequencies in the fBm.
*
* \param from "Texturing and Modelling: A procedural approach".
*/
float musgrave_fBm(const float3 co, const float H, const float lacunarity, const float octaves);
/**
@ -276,8 +270,6 @@ float musgrave_fBm(const float3 co, const float H, const float lacunarity, const
* \param H: fractal increment parameter.
* \param lacunarity: gap between successive frequencies.
* \param octaves: number of frequencies in the fBm.
*
* \param from "Texturing and Modelling: A procedural approach".
*/
float musgrave_fBm(const float4 co, const float H, const float lacunarity, const float octaves);

View File

@ -768,6 +768,8 @@ float musgrave_fBm(const float co,
const float lacunarity,
const float octaves_unclamped)
{
/* From "Texturing and Modelling: A procedural approach". */
float p = co;
float value = 0.0f;
float pwr = 1.0f;
@ -917,6 +919,8 @@ float musgrave_fBm(const float2 co,
const float lacunarity,
const float octaves_unclamped)
{
/* From "Texturing and Modelling: A procedural approach". */
float2 p = co;
float value = 0.0f;
float pwr = 1.0f;
@ -1067,6 +1071,8 @@ float musgrave_fBm(const float3 co,
const float lacunarity,
const float octaves_unclamped)
{
/* From "Texturing and Modelling: A procedural approach". */
float3 p = co;
float value = 0.0f;
float pwr = 1.0f;
@ -1219,6 +1225,8 @@ float musgrave_fBm(const float4 co,
const float lacunarity,
const float octaves_unclamped)
{
/* From "Texturing and Modelling: A procedural approach". */
float4 p = co;
float value = 0.0f;
float pwr = 1.0f;

View File

@ -229,7 +229,7 @@ void EDBM_select_mirrored(struct BMEditMesh *em,
* actual distance.
* \param use_select_bias:
* - When true, selected vertices are given a 5 pixel bias
* to make them further than unselect verts.
* to make them further than unselected vertices.
* - When false, unselected vertices are given the bias.
* \param use_cycle: Cycle over elements within #FIND_NEAR_CYCLE_THRESHOLD_MIN in order of index.
*/
@ -570,7 +570,7 @@ bool ED_mesh_uv_texture_remove_active(struct Mesh *me);
bool ED_mesh_uv_texture_remove_named(struct Mesh *me, const char *name);
void ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me);
/**
* Without bContext, called in uvedit.
* Without a #bContext, called when UV-editing.
*/
void ED_mesh_uv_loop_reset_ex(struct Mesh *me, const int layernum);
bool ED_mesh_color_ensure(struct Mesh *me, const char *name);

View File

@ -1161,7 +1161,7 @@ float ED_view3d_offset_distance(const float mat[4][4],
/**
* Set the dist without moving the view (compensate with #RegionView3D.ofs)
*
* \note take care that viewinv is up to date, #ED_view3d_update_viewmat first.
* \note take care that #RegionView3d.viewinv is up to date, #ED_view3d_update_viewmat first.
*/
void ED_view3d_distance_set(struct RegionView3D *rv3d, const float dist);
/**

View File

@ -90,7 +90,7 @@ void screen_draw_split_preview(struct ScrArea *area, const eScreenAxis dir_axis,
/* screen_edit.c */
/**
* Empty screen, with 1 dummy area without spacedata. Uses window size.
* Empty screen, with 1 dummy area without space-data. Uses window size.
*/
bScreen *screen_add(struct Main *bmain, const char *name, const rcti *rect);
void screen_data_copy(bScreen *to, bScreen *from);

View File

@ -682,8 +682,8 @@ class VariableState : NonCopyable, NonMovable {
/**
* Destruct the masked elements in this variable.
* \return True when all elements of this variable are unitialized and the variable state can be
* released.
* \return True when all elements of this variable are initialized and the variable state can be
* released.
*/
bool destruct(IndexMask mask,
IndexMask full_mask,

View File

@ -405,7 +405,7 @@ enum {
#define _VA_IS_EVENT_MOD4(v, a, b, c) (_VA_IS_EVENT_MOD3(v, a, b) || ((v)->c))
#define _VA_IS_EVENT_MOD5(v, a, b, c, d) (_VA_IS_EVENT_MOD4(v, a, b, c) || ((v)->d))
/* reusable IS_EVENT_MOD(event, shift, ctrl, alt, oskey), macro */
/** Reusable `IS_EVENT_MOD(event, shift, ctrl, alt, oskey)` macro. */
#define IS_EVENT_MOD(...) VA_NARGS_CALL_OVERLOAD(_VA_IS_EVENT_MOD, __VA_ARGS__)
enum eEventType_Mask {